Skip to content

Commit

Permalink
.github/workflows/doc-build.yml: Simplify, upgrade actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoeppe committed May 10, 2024
1 parent 92c56e5 commit 462b77e
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions .github/workflows/doc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ env:
FROM_DOCKER_TARGET: "with-targets"
FROM_DOCKER_TAG: ${{ github.event.inputs.docker_tag || 'dev'}}
EXTRA_CONFIGURE_ARGS: --enable-fat-binary
# For deployment of the sagemath_doc_... wheels to PyPI
CAN_DEPLOY: ${{ secrets.SAGEMATH_PYPI_API_TOKEN != '' }}

jobs:
build-docs:
Expand Down Expand Up @@ -216,37 +218,25 @@ jobs:

- name: Upload live doc
if: (success() || failure()) && steps.copylivedoc.outcome == 'success'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: livedoc
path: livedoc.zip

- name: Upload sagemath-doc wheels
id: uploaddocwheels
if: (success() || failure()) && steps.buildlivedoc.outcome == 'success'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
path: ./venv/var/lib/sage/wheels/sagemath_doc*.whl

upload_wheels:
needs: build-docs
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
env:
CAN_DEPLOY: ${{ secrets.SAGEMATH_PYPI_API_TOKEN != '' }}
steps:

- uses: actions/download-artifact@v3
with:
name: wheels
path: wheelhouse

- uses: pypa/gh-action-pypi-publish@release/v1
if: env.CAN_DEPLOY == 'true'
if: (success() || failure()) && steps.buildlivedoc.outcome == 'success'
with:
user: __token__
password: ${{ secrets.SAGEMATH_PYPI_API_TOKEN }}
packages-dir: wheelhouse/
skip-existing: true
verbose: true
if: env.CAN_DEPLOY == 'true'

0 comments on commit 462b77e

Please sign in to comment.