Skip to content

Commit 3587e1a

Browse files
committed
Add GitHub Pages docs workflow
1 parent 9f87b73 commit 3587e1a

2 files changed

Lines changed: 68 additions & 3 deletions

File tree

.github/workflows/docs.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: pages
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Check out repository
23+
uses: actions/checkout@v4
24+
25+
- name: Set up Python
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: "3.12"
29+
30+
- name: Set up R
31+
uses: r-lib/actions/setup-r@v2
32+
33+
- name: Install system libraries for R packages
34+
run: |
35+
sudo apt-get update
36+
sudo apt-get install -y libcurl4-openssl-dev libssl-dev libxml2-dev
37+
38+
- name: Install mizer in R
39+
run: |
40+
Rscript -e 'install.packages("remotes", repos = "https://cloud.r-project.org")'
41+
Rscript -e 'remotes::install_github("sizespectrum/mizer")'
42+
43+
- name: Install Python package with docs dependencies
44+
run: |
45+
python -m pip install --upgrade pip
46+
python -m pip install -e '.[docs]'
47+
48+
- name: Build documentation site
49+
run: mkdocs build --strict
50+
51+
- name: Upload Pages artifact
52+
uses: actions/upload-pages-artifact@v3
53+
with:
54+
path: site
55+
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

mkdocs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
site_name: pymizer
22
site_description: Python wrappers for the mizer R package
3-
site_url: https://sizespectrum.org/mizer/python/
4-
repo_url: https://github.com/sizespectrum/mizer
5-
repo_name: sizespectrum/mizer
3+
site_url: https://sizespectrum.github.io/pymizer/
4+
repo_url: https://github.com/sizespectrum/pymizer
5+
repo_name: sizespectrum/pymizer
66
docs_dir: docs
77
site_dir: site
88

0 commit comments

Comments
 (0)