Merge pull request #66 from lanl/treddy_issue_65 #14
This file contains hidden or 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: Docs Pages Deployment CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| build-docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Print out github ref info | |
| run: | | |
| echo "repository = ${{ github.repository }}" | |
| echo "event_name = ${{ github.event_name }}" | |
| echo "ref = ${{ github.ref }}" | |
| echo "ref_name = ${{ github.ref_name }}" | |
| echo "head_ref = ${{ github.head_ref }}" | |
| echo "base_ref = ${{ github.base_ref }}" | |
| echo "sha = ${{ github.sha }}" | |
| echo "GITHUB_REF = ${GITHUB_REF}" | |
| echo "GITHUB_REF_NAME = ${GITHUB_REF_NAME}" | |
| echo "GITHUB_SHA = ${GITHUB_SHA}" | |
| echo "--- git state ---" | |
| git rev-parse --abbrev-ref HEAD | |
| git rev-parse HEAD | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install -v -e ".[test]" | |
| python -m pip install -r .github/constraints/deps.txt | |
| - name: lint and build docs | |
| run: | | |
| numpydoc lint src/gfdl/model.py src/gfdl/activations.py src/gfdl/weights.py | |
| cd docs && make html SPHINXOPTS="-W --keep-going" | |
| # needed for pages deployment from the main or the deployment test branch | |
| - name: upload pages artifacts | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: docs/build/html | |
| # deploy for push events on the main or deployment test branch | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: build-docs | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| steps: | |
| - uses: actions/deploy-pages@v4 |