update environment.yml
with sphinx dependancies
#4
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: Doc Build and Upload | |
on: | |
push: | |
branches: | |
- sg_docs | |
env: | |
ENV_FILE: environment.yml | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
permissions: | |
contents: read | |
jobs: | |
web_and_docs: | |
name: Doc Build and Upload | |
runs-on: ubuntu-22.04 | |
# concurrency: | |
# # https://github.community/t/concurrecy-not-work-for-push/183068/7 | |
# group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-web-docs | |
# cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash -el {0} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Conda | |
uses: ./.github/actions/setup-conda | |
with: | |
environment-file: ${{ env.ENV_FILE }} | |
- name: Build Sphinx documentation | |
run: | | |
conda run -n myenv sphinx-build -b html docs docs/build/html | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs/_build/html # Change this if your output directory is different |