Merge pull request #849 from wwarriner/feat-grant-doc #178
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: ci | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
defaults: | |
run: | |
shell: bash -el {0} | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Lint Markdown | |
uses: DavidAnson/markdownlint-cli2-action@v16 | |
with: | |
config: .markdownlint-cli2.jsonc | |
globs: "**/*.md" | |
- name: Setup Miniforge | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
miniforge-version: latest | |
conda-solver: libmamba | |
environment-file: build_env.yml | |
activate-environment: build | |
- name: Build pages | |
run: | | |
conda activate build | |
mkdocs build --strict | |
deploy: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
needs: check | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Miniforge | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
miniforge-version: latest | |
conda-solver: libmamba | |
environment-file: build_env.yml | |
activate-environment: build | |
- name: Build | |
# only runs on main branch if a push event | |
# forbids changes to gh-pages branch on other events | |
run: mkdocs build --strict | |
- name: Deploy | |
uses: oprypin/push-to-gh-pages@v3 | |
with: | |
publish_dir: ./site |