Test og doc #15063
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy app to AWS | |
on: | |
push: | |
branches: [main, develop] | |
paths-ignore: | |
- "apps/api/**" | |
pull_request: | |
branches: [main, develop, dependency_updates] | |
paths-ignore: | |
- "apps/api/**" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
deploy_to_S3: | |
name: Deploy app to S3 | |
runs-on: ubuntu-latest | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: "eu-west-1" | |
NEXT_PUBLIC_SENTRY: "https://[email protected]/5799127" | |
steps: | |
- name: Check out the repo | |
uses: actions/[email protected] | |
- name: Enable Corepack before setting up Node | |
run: corepack enable | |
- name: Set up Node.js | |
uses: actions/[email protected] | |
with: | |
node-version: "20.x" | |
cache: "yarn" | |
- run: corepack enable && yarn install | |
- run: yarn run check-types | |
- run: yarn run check-format | |
- name: Test build | |
env: | |
NEXT_PUBLIC_API_HOST: https://prod-mong-api.skde.org | |
run: | | |
yarn run export | |
- name: Build and sync main to S3 bucket skde.org | |
if: github.ref == 'refs/heads/main' | |
env: | |
NEXT_PUBLIC_API_HOST: https://prod-mong-api.skde.org | |
run: | | |
yarn run export | |
aws s3 sync apps/skde/out s3://skde.org \ | |
--exclude "helseatlas/files/*" \ | |
--delete \ | |
--cache-control "public, max-age=1, s-maxage=1" | |
- name: Build and sync develop to S3 bucket qa.skde.org | |
if: github.ref == 'refs/heads/develop' | |
env: | |
NEXT_PUBLIC_API_HOST: https://qa-mong-api.skde.org | |
run: | | |
yarn run export | |
aws s3 sync apps/skde/out s3://qa.skde.org \ | |
--exclude "helseatlas/files/*" \ | |
--delete \ | |
--cache-control "public, max-age=1, s-maxage=1" | |
- name: Build and sync to verify page | |
if: github.ref == 'refs/heads/main' | |
env: | |
NEXT_PUBLIC_API_HOST: https://verify-mong-api.skde.org | |
NEXT_PUBLIC_VERIFY: "true" | |
run: | | |
yarn run export | |
aws s3 sync apps/skde/out s3://verify.skde.org \ | |
--exclude "helseatlas/files/*" \ | |
--delete \ | |
--cache-control "public, max-age=1, s-maxage=1" |