Skip to content

Commit

Permalink
docs: Publish docs on every PR, not just releases
Browse files Browse the repository at this point in the history
We can revert this later, but it will be helpful to us during the PyCon
US 2024 sprints.

Signed-off-by: Matt Wozniski <[email protected]>
  • Loading branch information
godlygeek committed May 20, 2024
1 parent 9822c09 commit bce8b72
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 31 deletions.
31 changes: 0 additions & 31 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,34 +200,3 @@ jobs:
with:
skip_existing: true
password: ${{ secrets.PYPI_PASSWORD }}

publish_docs:
name: Publish docs
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Set up dependencies
run: |
sudo apt-get update
sudo apt-get install -qy clang-format npm libunwind-dev liblz4-dev pkg-config
- name: Install Python dependencies
run: |
python3 -m pip install -r requirements-extra.txt
- name: Install Package
run: |
python3 -m pip install -e .
- name: Build docs
run: |
make docs
- name: Publish docs to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs/_build/html
single-commit: true
38 changes: 38 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Docs

on:
push:
branches:
- main

jobs:
publish_docs:
name: Publish docs
runs-on: ubuntu-latest
#if: github.event_name == 'release' && github.event.action == 'published'
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Set up dependencies
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -qy libunwind-dev liblz4-dev pkg-config
- name: Install Python dependencies
run: |
python3 -m pip install -r requirements-extra.txt
- name: Install Package
run: |
python3 -m pip install -e .
- name: Build docs
run: |
make docs
- name: Publish docs to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs/_build/html
single-commit: true

0 comments on commit bce8b72

Please sign in to comment.