-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (45 loc) · 1.25 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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