-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (38 loc) · 1.24 KB
/
main.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
name: Deploy
permissions:
id-token: write
contents: read
on:
push:
branches:
- main
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: 'latest'
# extended: true
- name: Create CV
uses: docker://pandoc/extra:3.1.1.0
with:
args: content/cv.md --output=static/cv.pdf --template /.pandoc/templates/eisvogel.latex --listings -V block-headings
- name: Build
run: hugo --minify
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: eu-west-2
role-to-assume: arn:aws:iam::261964097300:role/github-mikebellio-deploy
- name: S3 Sync
run: aws s3 sync public s3://mikebell.io --acl public-read --follow-symlinks --delete
shell: bash
- name: Invalidate cloudfront
run: aws cloudfront create-invalidation --distribution-id ${{ secrets.CLOUDFRONTID }} --paths "/*"