-
Notifications
You must be signed in to change notification settings - Fork 11
66 lines (66 loc) · 1.82 KB
/
website-publish.yml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: website - publish
on:
release:
types:
- released
jobs:
check_tag:
runs-on: ubuntu-latest
outputs:
run_other_jobs: ${{ steps.check-tag.outputs.run_jobs }}
steps:
- name: check tag ${{ github.event.release.target_commitish }} - ${{ github.event.release.tag_name }}
id: check-tag
run: |
if [[ ${{ github.event.release.target_commitish }} == "main" && ${{ github.event.release.tag_name }} =~ ^v.*\+web$ ]]; then
echo "::set-output name=run_jobs::true"
else
echo "::set-output name=run_jobs::false"
fi
verify:
needs: [check_tag]
runs-on: ubuntu-latest
steps:
- name: Print check tag
run: echo '${{ needs.check_tag.outputs.run_other_jobs == 'true' }}'
publish:
needs: [check_tag]
if: needs.check_tag.outputs.run_other_jobs == 'true'
runs-on: ubuntu-latest
steps:
- name: Copy Files
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20.5.0
- name: Print Node version
run: node -v
- name: Print yarn version
run: yarn -v
- name: Design system install dependencies
run: |-
cd packages/design
yarn
- name: Design system build
run: |-
cd packages/design
yarn build
- name: Install dependencies
run: |-
cd apps/website
yarn
- name: Run build
run: |-
cd apps/website
yarn build
- name: Deploy
run: |-
cd apps/website
yarn deploy
- name: Publish
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: ./apps/website/out
cname: z3us.com