-
Notifications
You must be signed in to change notification settings - Fork 2
105 lines (83 loc) · 2.52 KB
/
development.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: CI/CD (development)
on:
pull_request:
workflow_call:
workflow_dispatch:
jobs:
loganmarchione-github-io:
name: Deploy (loganmarchione.github.io)
runs-on: ubuntu-latest
env:
HUGO_VERSION: '0.136.5'
steps:
- name: Check out the codebase
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: ${{ env.HUGO_VERSION }}
extended: true
- name: Build
run: hugo --gc -DEF --baseURL="https://${{ env.URL }}"
env:
URL: loganmarchione.github.io
- name: Overwrite robots.txt (for search engines)
run: |
: > ./public/robots.txt
echo "User-agent: *" >> ./public/robots.txt
echo "Disallow: /" >> ./public/robots.txt
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
personal_token: ${{ secrets.PERSONAL_TOKEN }}
external_repository: loganmarchione/loganmarchione.github.io
publish_branch: gh-pages
publish_dir: ./public
loganmarchione-dev:
name: Deploy (loganmarchione.dev)
needs: loganmarchione-github-io
runs-on: ubuntu-latest
env:
HUGO_VERSION: '0.136.5'
permissions:
id-token: write
contents: read
steps:
- name: Check out the codebase
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: ${{ env.HUGO_VERSION }}
extended: true
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.ROLE_TO_ASSUME_ARN_DEV }}
role-duration-seconds: 900
aws-region: us-east-2
- name: Update CloudFront Distribution
run: sed -i "s/CLOUDFRONT_DISTRIBUTION_DEV/${{ secrets.CLOUDFRONT_DISTRIBUTION_DEV }}/g" hugo.yaml
- name: Build
run: hugo --gc -DEF --baseURL="https://${{ env.URL }}"
env:
URL: loganmarchione.dev
- name: Overwrite robots.txt (for search engines)
run: |
: > ./public/robots.txt
echo "User-agent: *" >> ./public/robots.txt
echo "Disallow: /" >> ./public/robots.txt
- name: Deploy to S3
run: hugo deploy --maxDeletes -1 --invalidateCDN --target loganmarchione-dev --logLevel info