Skip to content

Commit 00f33e9

Browse files
authored
Add GitHub Actions workflow for website deployment
Signed-off-by: TheCommCraft <[email protected]>
1 parent 7ef6ec2 commit 00f33e9

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Deploy the scratchattach website
2+
3+
on:
4+
push:
5+
branches:
6+
- main # ✅ only run on this branch
7+
paths:
8+
- 'website/**'
9+
workflow_dispatch:
10+
11+
jobs:
12+
deploy:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
- name: Move website directory
18+
run: |
19+
git checkout main
20+
git worktree add /tmp/website website
21+
cd /tmp/website
22+
rm -rf *
23+
cp -r ../../website/* .
24+
git add --all
25+
git commit -m "Deploy mydir contents to website"
26+
git push origin website --force

0 commit comments

Comments
 (0)