-
Notifications
You must be signed in to change notification settings - Fork 59
39 lines (34 loc) · 981 Bytes
/
deploy-demo.yml
File metadata and controls
39 lines (34 loc) · 981 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
30
31
32
33
34
35
36
37
38
39
name: deploy-demo
on:
push:
branches:
- main
jobs:
deploy-demo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
- uses: google/wireit@setup-github-actions-caching/v2
- run: npm ci
- run: npx playwright install-deps
- run: npx playwright install
- run: npm run build
- name: Deploy to gh-pages
run: |
cp -r configurator/deploy ..
git fetch origin gh-pages --depth=1
git checkout --track origin/gh-pages
ls -A1 | grep -vx .git | xargs rm -rf
mv ../deploy/* .
if [[ -n $(git status -s) ]]
then
git config user.name "$GITHUB_ACTOR (bot)"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
git add -A
git commit -am "Deploy $GITHUB_SHA"
git push
fi