Skip to content

build docs with github pages (#15137) #3

build docs with github pages (#15137)

build docs with github pages (#15137) #3

Workflow file for this run

name: Build and Deploy Docs
on:
pull_request:
branches:
- '**'
push:
branches:
- main
jobs:
build_docs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: pip install -r requirements/docs.txt
- name: Build documentation
run: make -C docs html
- name: Upload artifact for deployment (Push to main)
uses: actions/upload-pages-artifact@v1
with:
path: docs/_build/html
deploy:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
needs: build_docs
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4