-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (37 loc) · 997 Bytes
/
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
name: Assorion Website Deploy
env:
ZOLA_VERSION: "0.15.3"
SOURCE_BRANCH: "main"
TARGET_BRANCH: "gh-pages"
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
issues: write
steps:
- name: Check out repo
uses: actions/checkout@main
- name: Install zola
run: |
set -x
wget -O - \
"https://github.com/getzola/zola/releases/download/v${ZOLA_VERSION}/zola-v${ZOLA_VERSION}-x86_64-unknown-linux-gnu.tar.gz" \
| sudo tar xzf - -C /usr/local/bin
- name: Generate HTML
run: zola build
- name: Deploy to gh-pages
if: ${{ github.event_name == 'push' && github.ref == format('refs/heads/{0}', env.SOURCE_BRANCH) }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./gh-pages
force_orphan: true