1.7.1 #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow builds the documentation on release and pushes it to the gh-pages branch. | |
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
name: Deploy Docs | |
on: | |
release: | |
types: [published] | |
jobs: | |
build-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Checkout gh-pages | |
uses: actions/checkout@v3 | |
with: | |
path: docs/_tmp | |
ref: gh-pages | |
- name: Import GPG key for signing commits | |
id: import-gpg | |
uses: crazy-max/ghaction-import-gpg@v5 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
git_config_global: true | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install wheel | |
python -m pip install -r requirements-doc.txt | |
- name: Build docs | |
run: | | |
cd docs | |
make docs | |
- name: Deploy docs | |
run: | | |
MSG="Docs built for commit `git log -1 --pretty=format:'%H'`" | |
echo $MSG | |
cd docs/_tmp | |
git rm -rf --ignore-unmatch --quiet . | |
cp -R ../build/html/. . | |
touch .nojekyll | |
git add --all | |
git commit -m "$MSG" | |
git push origin gh-pages | |
env: | |
GIT_AUTHOR_NAME: ${{ steps.import-gpg.outputs.name }} | |
GIT_AUTHOR_EMAIL: ${{ steps.import-gpg.outputs.email }} | |
GIT_COMMITTER_NAME: ${{ steps.import-gpg.outputs.name }} | |
GIT_COMMITTER_EMAIL: ${{ steps.import-gpg.outputs.email }} |