Skip to content

Commit 8d920fe

Browse files
authored
Update deployment workflow for website directory
Signed-off-by: TheCommCraft <[email protected]>
1 parent ed0676f commit 8d920fe

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

.github/workflows/deploy-website.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,20 @@ jobs:
1414
steps:
1515
- name: Checkout repository
1616
uses: actions/checkout@v4
17-
- name: Move website directory
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Set up Git
21+
run: |
22+
git config user.name "github-actions[bot]"
23+
git config user.email "github-actions[bot]@users.noreply.github.com"
24+
25+
- name: Deploy website directory to website branch
1826
run: |
19-
git checkout main
2027
git worktree add /tmp/website --orphan website
2128
cd /tmp/website
2229
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
30+
cp -r ${{ github.workspace }}/website/* .
31+
git add .
32+
git commit -m "Deploy website directory to website branch"
33+
git push -u origin website --force

0 commit comments

Comments
 (0)