deploy-docs #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: deploy-docs | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| release_tag: | |
| description: 'Release tag to deploy (e.g. wxPython-4.2.5)' | |
| required: true | |
| type: string | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Download docs asset from Phoenix release | |
| run: | | |
| ASSET_URL=$(curl -s "https://api.github.com/repos/wxWidgets/Phoenix/releases/tags/${{ inputs.release_tag }}" \ | |
| | jq -r '.assets[] | select(.name | startswith("wxPython-docs-")) | .browser_download_url') | |
| curl -L -o wxPython-docs.tar.gz "$ASSET_URL" | |
| - name: Extract docs | |
| run: | | |
| mkdir html | |
| tar -xzf wxPython-docs.tar.gz --strip-components=3 -C html | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: html | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |