From 402bc29e8a26fa40e974fee0549af3bcd34b01be Mon Sep 17 00:00:00 2001 From: Michael Milton Date: Tue, 7 Mar 2023 11:51:57 +1100 Subject: [PATCH 1/2] Add publish actions --- .github/workflows/pyslurm.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pyslurm.yml b/.github/workflows/pyslurm.yml index 86bcb9d8..566f7876 100644 --- a/.github/workflows/pyslurm.yml +++ b/.github/workflows/pyslurm.yml @@ -11,6 +11,9 @@ jobs: - "3.8" - "3.9" fail-fast: false + permissions: + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source steps: - name: Checkout repository code uses: actions/checkout@v2 @@ -44,4 +47,21 @@ jobs: pipenv run pytest -sv scripts/run_tests_in_container.py env: PYTHON: ${{ matrix.python-version }} - + - name: Build Docs + uses: ammaraskar/sphinx-action@0.4 + with: + docs-folder: doc + - name: Upload Github Pages asset + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + uses: actions/upload-pages-artifact@v1.2.4 + with: + path: build/html + - name: Deploy to GitHub Pages + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + id: deployment + uses: actions/deploy-pages@v1 + - name: Publish package + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file From 1b7921e85e3d49efbaff6527fa99c4a63a82ccd6 Mon Sep 17 00:00:00 2001 From: Michael Milton Date: Tue, 7 Mar 2023 14:37:01 +1100 Subject: [PATCH 2/2] Build wheel, fix wrong version --- .github/workflows/pyslurm.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pyslurm.yml b/.github/workflows/pyslurm.yml index 566f7876..5c62b722 100644 --- a/.github/workflows/pyslurm.yml +++ b/.github/workflows/pyslurm.yml @@ -51,9 +51,11 @@ jobs: uses: ammaraskar/sphinx-action@0.4 with: docs-folder: doc + - name: Build package + run: pip wheel . - name: Upload Github Pages asset if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') - uses: actions/upload-pages-artifact@v1.2.4 + uses: actions/upload-pages-artifact@v1.0.7 with: path: build/html - name: Deploy to GitHub Pages