-
Notifications
You must be signed in to change notification settings - Fork 14
55 lines (51 loc) · 1.76 KB
/
cd.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
name: CD
on: workflow_dispatch
concurrency:
group: ${{ github.ref_name }}
cancel-in-progress: true
jobs:
cd:
name: Continuous Delivery
if: github.ref_name == 'master' || github.ref_name == 'next'
runs-on: ubuntu-latest
environment: production
permissions:
pull-requests: write
id-token: write
actions: read
contents: write
security-events: write
statuses: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- name: Setup
uses: ./.github/actions/setup
- name: Lint
uses: ./.github/actions/lint
with:
WORKFLOW: 'cd'
- name: Build
uses: ./.github/actions/build
- name: Test
uses: ./.github/actions/test
- name: Publish
uses: ./.github/actions/publish
env:
DEBUG: '*'
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Deploy
uses: ./.github/actions/deploy
# Demo for next branch is deployed by the CI workflow
if: github.ref != 'refs/heads/next'
with:
AWS_ROLE: ${{ secrets.AWS_ROLE }}
AWS_REGION: ${{ secrets.AWS_REGION }}
AWS_BUCKET: ${{ secrets.AWS_BUCKET }}