DavidBuchanan314 is building docs #18
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
name: Build Docs | |
run-name: ${{ github.actor }} is building docs | |
on: workflow_dispatch | |
jobs: | |
Build-Docs: | |
runs-on: ubuntu-latest | |
steps: | |
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "This job is now running on a ${{ runner.os }} server hosted by GitHub!" | |
- run: echo "The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Install atmst python module | |
run: | | |
python3 -m pip install .[docs] | |
- name: Build the docs | |
run: | | |
cd ./docs/ | |
sphinx-apidoc -f -o _apidocs/ ../src/atmst ../src/atmst/all.py | |
make html | |
- name: Archive generated docs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: html-docs | |
path: docs/_build/html/ | |
- name: Push docs to gh pages | |
uses: cpina/github-action-push-to-another-repository@main | |
env: | |
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }} | |
with: | |
source-directory: docs/_build/html/ | |
destination-github-username: DavidBuchanan314 | |
destination-repository-name: davidbuchanan314.github.io | |
target-directory: atmst/ | |
user-email: [email protected] | |
target-branch: master |