mirror of
https://github.com/fastapi/fastapi.git
synced 2026-03-05 23:47:42 -05:00
* 🐛 Fix Gitter notification, use development gitter room until next release * 🔥 Remove trigger docs preview step from build-docs workflow as it requires a more privileged token, so it's now triggered by the preview docs watcher * 🔊 Dump context when building to allow debugging how to refactor the Gitter bot
36 lines
1.0 KiB
YAML
36 lines
1.0 KiB
YAML
name: Build Docs
|
|
on:
|
|
push:
|
|
pull_request:
|
|
types: [opened, synchronize]
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-18.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: "3.7"
|
|
- name: Install Flit
|
|
run: python3.7 -m pip install flit
|
|
- name: Install docs extras
|
|
run: python3.7 -m flit install --extras doc
|
|
- name: Build Docs
|
|
run: python3.7 ./scripts/docs.py build-all
|
|
- name: Zip docs
|
|
run: bash ./scripts/zip-docs.sh
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: docs-zip-${{ github.sha }}
|
|
path: ./docs.zip
|
|
- name: Deploy to Netlify
|
|
uses: nwtgck/actions-netlify@v1.1.5
|
|
with:
|
|
publish-dir: './site'
|
|
production-branch: master
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
env:
|
|
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
|
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|