diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b5a4b977..fb1246c7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,16 +15,19 @@ concurrency: # This job installs dependencies, build the book, and pushes it to `gh-pages` jobs: build-and-deploy-book: + permissions: + contents: write + id-token: write runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest] python-version: [3.9] steps: - - uses: actions/checkout@v2.3.3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} @@ -32,7 +35,7 @@ jobs: - name: Install dependencies run: | # Install Python dependencies - pip install --upgrade pip build .[doc] + pip install --upgrade pip build ".[doc]" # Build and install the theme package. - name: Build and install theme @@ -60,12 +63,10 @@ jobs: - name: Publish to PyPI if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} # If tagged version: Update release on github repo - uses: softprops/action-gh-release@v1 if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && startsWith(github.ref, 'refs/tags') + tag_name: ${{ env.tag }} with: generate_release_notes: true