Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically publish docs to GitHub Pages #30

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 57 additions & 1 deletion .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
release:
types:
- published
workflow_dispatch:
schedule:
# At 12:00 on every day-of-month
- cron: "0 12 */1 * *"
Expand Down Expand Up @@ -161,7 +162,9 @@ jobs:
upload_pypi:
needs: merge
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
if: |
github.event_name == 'release' && github.event.action == 'published'
|| github.event_name == 'workflow_dispatch'
steps:
- uses: actions/download-artifact@v4
with:
Expand All @@ -171,3 +174,56 @@ jobs:
with:
skip_existing: true
password: ${{ secrets.PYPI_PASSWORD }}

publish_docs:
name: Publish docs to GitHub Pages
needs: merge
runs-on: ubuntu-latest
# Eventually, we want this to be updated only on releases, in the same way
# PyPI uploads are done. For the moment, though, our uploads are dry runs
# only, set below, and we want to test on every build.
#
#if: |
# github.event_name == 'release' && github.event.action == 'published'
# || github.event_name == 'workflow_dispatch'
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 pkg-config bison libfl-dev libz-dev

- name: Install Python dependencies
run: |
python3 -m pip install -r requirements-lint-docs.txt

- name: Download wheel artifact
uses: actions/download-artifact@v4
with:
name: dist-Linux-cp310-x86_64
path: blazingmq.whl

- name: Install Package
run: |
python3 -m pip install blazingmq.whl

- 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
# Make sure this does not actually publish any documentation, so we
# can test that everything works correctly.
dry-run: true
Loading