Skip to content

Commit

Permalink
RTD workflow (#359)
Browse files Browse the repository at this point in the history
* Update publish-to-test-pypi.yml

* Create rebuild_docs.yml
  • Loading branch information
perdelt authored Oct 10, 2024
1 parent 8cdb473 commit fdb4a5f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ jobs:
.
- name: Publish distribution 📦 to Test PyPI
#if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI
#if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
27 changes: 27 additions & 0 deletions .github/workflows/rebuild_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Rebuild Docs on ReadTheDocs

on:
# Trigger the workflow on push to the dev branch
push:
branches:
- dev
# Optionally trigger on pull request merges
pull_request:
branches:
- master

jobs:
trigger-docs-build:
runs-on: ubuntu-latest

steps:
- name: Trigger documentation rebuild on Read the Docs
env:
# Set your environment variables for the request
READTHEDOCS_API_TOKEN: ${{ secrets.READTHEDOCS_API_TOKEN }}
READTHEDOCS_PROJECT_SLUG: bexhoma
run: |
# Use curl to trigger the RTD build
curl -X POST \
-H "Authorization: Token ${READTHEDOCS_API_TOKEN}" \
https://readthedocs.org/api/v3/projects/${READTHEDOCS_PROJECT_SLUG}/versions/latest/builds/

0 comments on commit fdb4a5f

Please sign in to comment.