-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.02 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
name: build
on:
push:
branches:
- master
repository_dispatch:
jobs:
build-deploy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
# Install NPM prerequisites
- run: sudo apt-get update && sudo apt-get install npm && npm install
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.61.0'
extended: true
- name: Build
run: |
HUGO_ENV="production" hugo --gc
# Move the hugo stuff into a subdir for now until we're ready to publish
mv public unreleased
mkdir public
mv unreleased public
# Ensure the CNAME file is maintained when publishing
cp CNAME public
echo "Coming Soon" > public/index.html
- name: Deploy
uses: peaceiris/actions-gh-pages@v2
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./public
with:
forceOrphan: true