-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (45 loc) · 1.42 KB
/
build.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
name: Build and Deploy
on: push
jobs:
stagingbuild:
name: Staging Build and Deploy
runs-on: ubuntu-latest
if: github.ref_name == 'staging'
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Hugo Setup
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.101.0'
extended: true
- name: Hugo Build
run: hugo -v --baseURL "https://staging.doi.org/"
- name: Deploy to S3
if: github.ref_name == 'staging'
run: hugo -v deploy --target=s3_staging --maxDeletes -1 --force
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
livebuild:
name: Live Build and Deploy
runs-on: ubuntu-latest
if: github.ref_name == 'main'
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Hugo Setup
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.101.0'
extended: true
- name: Hugo Build
run: hugo -v --baseURL "https://www.doi.org/"
- name: Deploy to S3
if: github.ref_name == 'main'
run: hugo -v deploy --target=s3_live --maxDeletes -1
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}