Skip to content

Commit fcb8538

Browse files
authored
Refactor GitHub Actions workflow for website deployment
Signed-off-by: TheCommCraft <[email protected]>
1 parent 8d920fe commit fcb8538

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed
Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy the scratchattach website
1+
name: Deploy website
22

33
on:
44
push:
@@ -11,9 +11,9 @@ on:
1111
jobs:
1212
deploy:
1313
runs-on: ubuntu-latest
14+
1415
steps:
15-
- name: Checkout repository
16-
uses: actions/checkout@v4
16+
- uses: actions/checkout@v4
1717
with:
1818
fetch-depth: 0
1919

@@ -24,10 +24,9 @@ jobs:
2424
2525
- name: Deploy website directory to website branch
2626
run: |
27-
git worktree add /tmp/website --orphan website
28-
cd /tmp/website
29-
rm -rf *
30-
cp -r ${{ github.workspace }}/website/* .
27+
git switch --orphan website-tmp
28+
git rm -rf .
29+
cp -r website/* .
3130
git add .
32-
git commit -m "Deploy website directory to website branch"
33-
git push -u origin website --force
31+
git commit -m "Deploy website directory"
32+
git push origin website --force

0 commit comments

Comments
 (0)