Skip to content

Build & Deploy Doc #373

Build & Deploy Doc

Build & Deploy Doc #373

name: Build & Deploy Doc
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
# * is a special character in YAML so you have to quote this string
# at 4 am
- cron: '0 4 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
# avoid failure on git push
# see https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-first-deployment-with-github_token
#permissions:
# contents: write
steps:
# https://github.com/actions/checkout
- uses: actions/checkout@v3
# https://github.com/actions/setup-python
- uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Install
run: |
curl -sSL https://install.python-poetry.org | python3 -
poetry install --all-extras --without lint,test
- name: Make
run: poetry run make -C docs html
- name: Deploy
if: ${{ github.ref == 'refs/heads/main' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/html