deploy_docs #297
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 GitHub Pages from upstream artifact | |
| on: | |
| repository_dispatch: | |
| types: [ deploy_docs ] | |
| workflow_dispatch: | |
| inputs: | |
| source_repo: | |
| description: 'Source repository (owner/repo)' | |
| required: true | |
| run_id: | |
| description: 'Workflow run ID to download artifact from' | |
| required: true | |
| ref: | |
| description: 'Git ref that triggered the build (e.g., refs/tags/v1.2.3 or refs/heads/main)' | |
| required: true | |
| permissions: | |
| contents: write | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-slim | |
| steps: | |
| - name: Checkout main | |
| uses: actions/checkout@v6 | |
| - name: Checkout gh-pages | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: gh-pages | |
| path: deploy | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Download artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifact | |
| repository: '${{ github.event.client_payload.source_repo || inputs.source_repo }}' | |
| name: acts-docs | |
| run-id: ${{ github.event.client_payload.run_id || inputs.run_id }} | |
| github-token: ${{ secrets.CROSS_REPO_ARTIFACT_READ }} | |
| # - run: | | |
| # ls -al | |
| # ls -al artifact | |
| - name: Deploy documentation | |
| env: | |
| GIT_REF: ${{ github.event.client_payload.ref || inputs.ref }} | |
| run: | | |
| uv run scripts/deploy_docs.py \ | |
| --ref "$GIT_REF" \ | |
| --source-dir artifact \ | |
| --deploy-dir deploy/docs | |
| - name: Deploy | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| folder: deploy/docs | |
| target-folder: docs |