mirror of
https://github.com/fastapi/fastapi.git
synced 2026-01-20 03:48:04 -05:00
* 🔧 Upload docs artifacts even on push to avoid breaking Preview Docs * 🔥 Remove replaced GitHub Action get-artifact * 🔥 Remove GitHub Action Watch Docs Previews, replaced with Preview Docs * 🔥 Remove commented backup configs in Preview Docs GitHub Action * 🔥 Remove no longer needed utils scripts
42 lines
1.2 KiB
YAML
42 lines
1.2 KiB
YAML
name: Preview Docs
|
|
on:
|
|
workflow_run:
|
|
workflows:
|
|
- Build Docs
|
|
types:
|
|
- completed
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Download Artifact Docs
|
|
uses: dawidd6/action-download-artifact@v2.9.0
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
workflow: build-docs.yml
|
|
run_id: ${{ github.event.workflow_run.id }}
|
|
name: docs-zip
|
|
- name: Unzip docs
|
|
run: |
|
|
rm -rf ./site
|
|
unzip docs.zip
|
|
rm -f docs.zip
|
|
- name: Deploy to Netlify
|
|
id: netlify
|
|
uses: nwtgck/actions-netlify@v1.1.5
|
|
with:
|
|
publish-dir: './site'
|
|
production-deploy: false
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
enable-commit-comment: false
|
|
env:
|
|
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
|
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
|
- name: Comment Deploy
|
|
uses: ./.github/actions/comment-docs-preview-in-pr
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
deploy_url: "${{ steps.netlify.outputs.deploy-url }}"
|