Skip to content

Commit

Permalink
docs.yml is now publish.yml
Browse files Browse the repository at this point in the history
Also change master to main
  • Loading branch information
tomicapretto authored Aug 9, 2021
1 parent 78293d2 commit 6ceb9d4
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Buld and publish documentation
on:
push:
branches:
- master
- main
pull_request:

jobs:
Expand Down Expand Up @@ -41,21 +41,21 @@ jobs:
path: docs/_build/html

- name: Test Build Docs
if: github.ref != 'refs/heads/master' && ! startsWith(github.ref, 'refs/tags')
if: github.ref != 'refs/heads/main' && ! startsWith(github.ref, 'refs/tags')
run: |
BUILDDIR=_build/html/master make -C docs/ local
BUILDDIR=_build/html/main make -C docs/ local
- name: Build Docs
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags')
# Use the args we normally pass to sphinx-build, but run sphinx-multiversion
run: |
sphinx-multiversion docs docs/_build/html
touch docs/_build/html/.nojekyll
cp docs/_assets/gh-pages-redirect.html docs/_build/html/index.html
- name: Publish Docs to gh-pages
# Only once from master or a tag
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')
# Only once from main or a tag
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags')
# We pin to the SHA, not the tag, for security reasons.
# https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
uses: peaceiris/actions-gh-pages@bbdfb200618d235585ad98e965f4aafc39b4c501 # v3.7.3
Expand Down

0 comments on commit 6ceb9d4

Please sign in to comment.