Skip to content

Commit

Permalink
Merge pull request OpenMathLib#4781 from rgommers/fix-docs-deployment
Browse files Browse the repository at this point in the history
fix CI job to deploy docs, and make it run on pull requests too
  • Loading branch information
martin-frbg authored Jul 3, 2024
2 parents 9836883 + 6ede8b1 commit f729013
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,36 @@
name: Publish docs via GitHub Pages

on:
push:
branches:
- develop
pull_request:
branches:
- develop

jobs:
build:
name: Deploy docs
if: "github.repository == 'OpenMathLib/OpenBLAS'"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v5
with:
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
- run: mkdocs build

- name: Install MkDocs and doc theme packages
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
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
if: ${{ github.ref == 'refs/heads/develop' }}
Expand Down

0 comments on commit f729013

Please sign in to comment.