(STAGE) Build and deploy frontend #12
Workflow file for this run
This file contains hidden or 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: (STAGE) Build and deploy frontend | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build-and-push: | |
| name: Build and push | |
| runs-on: ubuntu-24.04 | |
| environment: | |
| name: stage | |
| steps: | |
| - name: GIT | Checkout | |
| uses: actions/checkout@v4 | |
| - name: Export variables | |
| env: | |
| VARS_CONTEXT: ${{ toJson(vars) }} | |
| run: | | |
| EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) | |
| to_envs() { jq -r "to_entries[] | select(.key|startswith(\"PUBLIC_VAR\")) | \"\(.key)<<$EOF\n\(.value)\n$EOF\n\""; } | |
| echo "$VARS_CONTEXT" | to_envs >> $GITHUB_ENV | |
| - name: Build and deploy - STAGE | |
| uses: ./.github/actions/build-and-push | |
| with: | |
| environment: stage | |
| aws-access-key-id: ${{ secrets.AWS_S3_STAGE_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_S3_STAGE_SECRET_ACCESS_KEY }} | |
| s3-bucket-name: ${{ secrets.AWS_S3_STAGE_BUCKET_NAME }} | |
| amplify-app-id: ${{ secrets.AWS_AMPLIFY_STAGE_APP_ID }} | |
| npm-token: ${{ secrets.NPM_TOKEN }} |