ci: fix CI job to deploy docs, and make it run on pull requests too
This commit is contained in:
parent
df81b159e8
commit
6ede8b14c6
|
@ -1,8 +1,13 @@
|
||||||
name: Publish docs via GitHub Pages
|
name: Publish docs via GitHub Pages
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- develop
|
- develop
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- develop
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Deploy docs
|
name: Deploy docs
|
||||||
|
@ -10,12 +15,22 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: "3.10"
|
python-version: "3.10"
|
||||||
- run: pip install mkdocs mkdocs-material
|
|
||||||
# mkdocs gh-deploy command only builds to the top-level, hence building then deploying ourselves
|
- name: Install MkDocs and doc theme packages
|
||||||
- run: mkdocs build
|
run: pip install mkdocs mkdocs-material mkdocs-git-revision-date-localized-plugin
|
||||||
|
|
||||||
|
- name: Build docs site
|
||||||
|
run: mkdocs build
|
||||||
|
|
||||||
|
# mkdocs gh-deploy command only builds to the top-level, hence deploying
|
||||||
|
# with this action instead.
|
||||||
|
# Deploys to http://www.openmathlib.org/OpenBLAS/docs/
|
||||||
- name: Deploy docs
|
- name: Deploy docs
|
||||||
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
|
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
|
||||||
if: ${{ github.ref == 'refs/heads/develop' }}
|
if: ${{ github.ref == 'refs/heads/develop' }}
|
||||||
|
|
Loading…
Reference in New Issue