Skip to content

Commit 2532b54

Browse files
committed
Workflow for GH Pages
1 parent 740dfa6 commit 2532b54

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

.github/workflows/gh-pages.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Generate terms pages and deploy site
2+
3+
on:
4+
# Runs on pushes targeting the master branch
5+
push:
6+
branches:
7+
- 'master'
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20+
concurrency:
21+
group: "pages"
22+
cancel-in-progress: false
23+
24+
jobs:
25+
# Build job
26+
build:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
32+
- name: Setup python
33+
uses: actions/setup-python@v5
34+
with:
35+
python-version: 3.12
36+
cache: 'pip'
37+
cache-dependency-path: build/requirements.txt
38+
- name: Install dependencies
39+
run: |
40+
cd build && pip3 install -r requirements.txt
41+
- name: Create Python-generated pages
42+
run: |
43+
cd build && python3 build-webpages.py
44+
45+
- name: Setup Pages
46+
uses: actions/configure-pages@v5
47+
- name: Build with Jekyll
48+
uses: actions/jekyll-build-pages@v1
49+
with:
50+
source: ./docs
51+
destination: ./_site
52+
- name: Upload artifact
53+
uses: actions/upload-pages-artifact@v3
54+
55+
# Deployment job
56+
deploy:
57+
environment:
58+
name: github-pages
59+
url: ${{ steps.deployment.outputs.page_url }}
60+
runs-on: ubuntu-latest
61+
needs: build
62+
steps:
63+
- name: Deploy to GitHub Pages
64+
id: deployment
65+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)