Repository navigation
Deploy Documentation #7
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 Documentation | |
| on: | |
| workflow_run: | |
| workflows: ["Documentation"] | |
| types: | |
| - completed | |
| permissions: | |
| contents: read | |
| deployments: write | |
| pull-requests: write | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| name: Deploy to Cloudflare Pages | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| concurrency: | |
| group: docs-deploy-${{ github.event.workflow_run.head_branch }} | |
| cancel-in-progress: false | |
| steps: | |
| - name: Download build artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: docs-build | |
| path: dist | |
| run-id: ${{ github.event.workflow_run.id }} | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Publish to Cloudflare Pages | |
| uses: AdrianGonz97/refined-cf-pages-action@v1 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| githubToken: ${{ secrets.GITHUB_TOKEN }} | |
| projectName: inertia-native-docs | |
| directory: dist | |
| deploymentName: ${{ github.event.workflow_run.event == 'pull_request' && 'Preview' || 'Production' }} |