-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (51 loc) · 1.83 KB
/
publish.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
# From: https://github.com/victoriadrake/hugo-latest-cd
# Credits: https://github.com/victoriadrake
# LICENSE: https://github.com/victoriadrake/hugo-latest-cd/blob/master/LICENSE
#
# Changes by Just van den Broecke:
# - use https://github.com/marketplace/actions/deploy-to-github-pages
# TODO: GitHub provides a more modern version of Hugo Deploy Action
name: publish-osgeonl-website
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 🛎 Check out master
uses: actions/checkout@v2
with:
fetch-depth: 1
submodules: true
- name: 🔨 Set up Node
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: 🔧 Install tools
run: |
sudo apt install curl jq
npm install postcss-cli autoprefixer
- name: 🤵 Install Hugo
run: |
HUGO_VERSION=0.101.0
mkdir tmp/ && cd tmp/
curl -sSL https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz | tar -xvzf-
sudo mv hugo /usr/local/bin/
cd .. && rm -rf tmp/
hugo version
- name: 🍳 Build site osgeo.nl
run: ./generate.sh
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages # The branch the action should deploy to.
folder: public # The folder the action should deploy.
# - name: 🚀 Deploy build
# run: |
# git config user.name "${GITHUB_ACTOR}"
# git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
# git add .
# git commit -am "🚀 Deploy with ${GITHUB_WORKFLOW}"
# git push --all -f https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git