mirror of https://github.com/tiangolo/fastapi.git
👷 Add GitHub actions to deploy to Netlify (#983)
This commit is contained in:
parent
66954c7ded
commit
9ce50b4684
|
|
@ -0,0 +1,29 @@
|
||||||
|
name: Build and Deploy to Netlify
|
||||||
|
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 MkDocs
|
||||||
|
run: python3.7 -m mkdocs build
|
||||||
|
- name: Deploy to Netlify
|
||||||
|
uses: nwtgck/actions-netlify@v1.0
|
||||||
|
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 }}
|
||||||
Loading…
Reference in New Issue