fix build definition #2
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 site | |
on: | |
workflow_call: | |
inputs: | |
artifact-name: | |
required: true | |
type: string | |
secrets: | |
AWS_IAM_ROLE_GITHUB: | |
required: true | |
permissions: | |
id-token: write | |
env: | |
AWS_REGION: us-east-1 | |
S3_BUCKET: draft.oyam.ca | |
concurrency: | |
group: site-deploy-${{ github.ref_name }} | |
cancel-in-progress: true | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download website artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ inputs.artifact-name }} | |
path: public | |
- name: Download tools artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: deploy_aws_s3 | |
path: tools/deploy_aws_s3 | |
- uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ secrets.AWS_IAM_ROLE_GITHUB }} | |
role-session-name: GitHub-Action-Role | |
aws-region: ${{ env.AWS_REGION }} | |
- name: Upload website to S3 | |
#run: aws s3 sync --acl public-read --delete public/ s3://${{ env.S3_BUCKET }}/ | |
run: tools/deploy_aws_s3 --bucket ${{ env.S3_BUCKET }} public/ -v -a public-read -d | |
invalidate-cache: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Foo | |
uses: foo |