-
Notifications
You must be signed in to change notification settings - Fork 5
29 lines (22 loc) · 875 Bytes
/
Copy pathdeploy-prod.yml
File metadata and controls
29 lines (22 loc) · 875 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
name: Deploy Production
on:
workflow_dispatch:
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy to production
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git fetch origin gh-pages 2>/dev/null && git worktree add gh-pages-out gh-pages || \
(git worktree add --detach gh-pages-out && git -C gh-pages-out checkout --orphan gh-pages && git -C gh-pages-out rm -rf . 2>/dev/null || true)
rsync -a --delete web-client/ gh-pages-out/web-client/
cd gh-pages-out
git add -A
git diff --cached --quiet && echo "No changes" && exit 0
git commit -m "Deploy production [skip ci]"
git push origin gh-pages