Skip to content

Commit

Permalink
build docs with github pages (#15137)
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinMind authored Nov 7, 2024
1 parent 5b296de commit 148d994
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
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

0 comments on commit 148d994

Please sign in to comment.