-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (33 loc) · 1 KB
/
deploy-site.yaml
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
name: Build and Deploy site
on:
workflow_dispatch:
# Make the website deployment manual
# push:
# branches:
# - main
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Install jq
run: sudo apt-get update && sudo apt-get install -y jq
- name: Set HUGO_VERSION as env variable
run: echo "HUGO_VERSION=$(jq -r '.build.env.HUGO_VERSION' vercel.json)" >> $GITHUB_ENV
- name: Install Hugo
run: |
wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb
sudo dpkg -i hugo_extended_${HUGO_VERSION}_linux-amd64.deb
- name: Build site
run: hugo
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./public