diff --git a/.github/workflows/stage.yaml b/.github/workflows/stage.yaml new file mode 100644 index 0000000..c7b3458 --- /dev/null +++ b/.github/workflows/stage.yaml @@ -0,0 +1,24 @@ +name: Release to stage +on: + push: + branches: + - 'releases/**' + - 'hotfix/**' + workflow_dispatch: + +permissions: + id-token: write + contents: read + +jobs: + build_and_deploy: + uses: cere-io/reusable-workflows/.github/workflows/deploy-to-cloudfront.yaml@master + with: + build_container: 'node:18-buster-slim' + install_packages_command: 'cp .env.stage .env; npm ci' + build_command: 'npm run build' + path_to_static_files_to_upload: 'build' + aws_account_id: ${{ vars.STG_CORE_AWS_ACCOUNT_ID }} + s3_bucket_name: 'qr-code-scanner-stg.core-stage.aws.cere.io' + secrets: + NPM_TOKEN: ${{ secrets.NPM_TOKEN_READ }}