Repository navigation
57 lines (47 loc) · 1.57 KB
/
Copy pathdeploy.yml
File metadata and controls
57 lines (47 loc) · 1.57 KB
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
# Builds the site with Zola and publishes it to GitHub Pages on every push to main.
# One-time setup on GitHub: repo Settings → Pages → Build and deployment → Source: "GitHub Actions".
name: Build and deploy site
on:
push:
branches: [main]
pull_request: # builds (but does not deploy) pull requests, to catch errors
workflow_dispatch: # lets you re-run it by hand from the Actions tab
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
env:
ZOLA_VERSION: "0.23.6" # templates use Tera 2 syntax (Zola 0.23+)
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Convert BibTeX to bib.json # uses the runner's built-in Python 3
run: python3 scripts/bib2json.py
- name: Install Zola
run: |
curl -sL "https://github.com/getzola/zola/releases/download/v${ZOLA_VERSION}/zola-v${ZOLA_VERSION}-x86_64-unknown-linux-gnu.tar.gz" | tar xz
sudo mv zola /usr/local/bin/zola
zola --version
- name: Build site
run: zola build
- name: Upload site artifact
if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v5
with:
path: public
deploy:
if: github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5