Thanks to visit codestin.com
Credit goes to github.com

Skip to content

CI: Harden GHA configuration #312

CI: Harden GHA configuration

CI: Harden GHA configuration #312

Workflow file for this run

name: Docs
permissions:
contents: read
on: [push, pull_request]
defaults:
run:
shell: bash -l {0}
jobs:
build_docs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@b09ef9b599704322748535812ca03efb2625677b # v2
with:
environment-file: dev-environment.yml
- name: Install
run: python -m pip install -v .[docs]
- name: Build
run: make -C docs html
- name: Publish
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html
force_orphan: true