-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (27 loc) · 866 Bytes
/
Copy pathdeploy.yml
File metadata and controls
36 lines (27 loc) · 866 Bytes
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
name: Deploy static site to AWS
on:
push:
branches:
- main
permissions:
id-token: write
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate sitemap
run: python3 scripts/generate-sitemap.py
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::143876479570:role/GitHubActionsDeployCliffable
aws-region: eu-west-2
- name: Sync files to S3
run: aws s3 sync . s3://cliffable.com --delete --exclude ".git/*" --exclude ".github/*"
- name: Invalidate CloudFront cache
run: aws cloudfront create-invalidation --distribution-id E23DXCUNR3EV6E --paths "/*"