-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (39 loc) · 1.25 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
name: Build and Deploy
#
# The publishing workflow works as follows:
# - drafts is created in a branch (usually `dev` or `draft_*`)
# - publishing simply means doing a PR to main
# - when the PR is merged, this workflow must be executed first to deploy the content
# - other workflows (like notifications) can be executed after a successful deployment
#
on:
push:
branches:
- main
jobs:
build:
name: Generate the website
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-python@v5
with:
python-version: '3.11'
architecture: 'x64'
cache: 'pip'
- name: Install Zola
uses: taiki-e/install-action@v2
with:
tool: [email protected]
- name: Build and publish the site
run: |
python -m pip install --user -U ghp-import==2.1.0
source ~/.bashrc
git config --global user.name "hugsy"
git config --global user.email "[email protected]"
zola build -o output
ghp-import output --no-jekyll --branch=gh-pages --message="Generated new content"
git push --force origin gh-pages