Skip to content

build(deps): bump the npm_and_yarn group with 10 updates (#52) #19

build(deps): bump the npm_and_yarn group with 10 updates (#52)

build(deps): bump the npm_and_yarn group with 10 updates (#52) #19

name: 'deploy-to-staging'
on:
push:
branches:
- main
env:
# reduces noise from npm post-install scripts
DISABLE_OPENCOLLECTIVE: true
OPEN_SOURCE_CONTRIBUTOR: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'npm'
- run: npm ci
- run: npm run lint
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'npm'
- run: npm ci
- run: npm run typecheck
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'npm'
- run: npm ci
- run: npm test -- --coverage
deploy:
runs-on: ubuntu-latest
needs:
- lint
- typecheck
- test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'npm'
- run: npm ci
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.STAGING_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.STAGING_AWS_SECRET_ACCESS_KEY }}
aws-region: ap-southeast-2
- name: serverless deploy
run: npm run deploy:staging
env:
SLACK_WEBHOOK_URL: ${{ secrets.STAGING_SLACK_WEBHOOK_URL }}