fix github testing workflow: pytest now run without conda #15
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 | |
ref: sg_docs | |
- name: Set up Conda | |
uses: ./.github/actions/setup-conda | |
with: | |
environment-file: ${{ env.ENV_FILE }} | |
- name: Build Sphinx Docs | |
run: | | |
conda run -n test sphinx-build -b html docs/source docs/build/html | |
- name: Deploy to 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 |