Merge branch 'docs' of github.com:MIGG-NTU/PyTomoATT into docs #43
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Build documentations | |
on: | |
push: | |
branches: [ "docs" ] | |
workflow_call: | |
inputs: | |
config-path: | |
required: true | |
type: string | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/[email protected] | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
ref: docs | |
- name: Setup Mambaforge | |
uses: conda-incubator/[email protected] | |
with: | |
activate-environment: docs | |
environment-file: environment.yml | |
miniforge-variant: Mambaforge | |
use-mamba: true | |
- name: Build docs | |
run: | | |
make html | |
- name: Deploy documentation | |
uses: peaceiris/actions-gh-pages@068dc23d9710f1ba62e86896f84735d869951305 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./build/html | |
# Only keep the latest commit to avoid bloating the repository | |
force_orphan: true | |
user_name: 'github-actions[bot]' | |
user_email: 'github-actions[bot]@users.noreply.github.com' |