From 8d2a5f70009684f7dd3a1ba27315f91897275c13 Mon Sep 17 00:00:00 2001 From: Gus Monod Date: Mon, 20 May 2024 13:56:05 -0400 Subject: [PATCH] ci: Generate documentation on every push to main This helps having the changes to documentation be visible faster, which is especially useful when we make rapid and frequent changes to it. Signed-off-by: Gus Monod --- .github/workflows/docs.yml | 38 +++++++++++++++++++++++++++++ .github/workflows/lint_and_docs.yml | 31 ----------------------- 2 files changed, 38 insertions(+), 31 deletions(-) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..f5a7980 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,38 @@ +name: Publish 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 -qy libdw-dev libelf-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 diff --git a/.github/workflows/lint_and_docs.yml b/.github/workflows/lint_and_docs.yml index da8280d..fc953ea 100644 --- a/.github/workflows/lint_and_docs.yml +++ b/.github/workflows/lint_and_docs.yml @@ -28,34 +28,3 @@ jobs: run: | towncrier build --version 99.99 --name pystack --keep make docs - - 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 libdw-dev libelf-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