Merge pull request #49 from rrigato/dev #56
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: Updates web application | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy-website-source-files: | |
permissions: | |
contents: read | |
id-token: write | |
runs-on: ubuntu-latest | |
name: web source files to s3 | |
defaults: | |
run: | |
working-directory: ./static | |
steps: | |
- name: checkout-current-branch | |
uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- run: npm install | |
- run: npm run test | |
- run: npm run build | |
- name: script-execution-permissions | |
run: chmod +x '../.github/scripts/homepage_source_files.sh' | |
- name: assume-github-actions-role | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
audience: sts.amazonaws.com | |
aws-region: ${{vars.REGION_NAME}} | |
role-to-assume: arn:aws:iam::${{secrets.AWS_ACCOUNT_ID}}:role/${{secrets.PIPELINE_ROLE_NAME}} | |
- name: upload-webpack-artifacts | |
shell: bash | |
env: | |
AWS_DEFAULT_REGION: ${{vars.REGION_NAME}} | |
run: '../.github/scripts/homepage_source_files.sh' | |
publish-commit-artifact: | |
needs: deploy-website-source-files | |
name: favicon to s3 bucket | |
permissions: | |
contents: read | |
id-token: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout-current-branch | |
uses: actions/checkout@v3 | |
- name: script-execution-permissions | |
run: chmod +x ./.github/scripts/orchestrate_artifacts.sh | |
- name: assume-github-actions-role | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
audience: sts.amazonaws.com | |
aws-region: ${{vars.REGION_NAME}} | |
role-to-assume: arn:aws:iam::${{secrets.AWS_ACCOUNT_ID}}:role/${{secrets.PIPELINE_ROLE_NAME}} | |
- name: upload-favicon-artifacts | |
shell: bash | |
env: | |
AWS_DEFAULT_OUTPUT: json | |
AWS_DEFAULT_REGION: ${{vars.REGION_NAME}} | |
AWS_S3_BUCKET_NAME: 'ryanrigato.com' | |
run: ./.github/scripts/orchestrate_artifacts.sh | |