Skip to content

CD

CD #374

Workflow file for this run

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@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # 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 }}