]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
:construction_worker: Add GitHub actions to deploy to Netlify (#983)
authorSebastián Ramírez <tiangolo@gmail.com>
Sat, 15 Feb 2020 12:24:34 +0000 (13:24 +0100)
committerGitHub <noreply@github.com>
Sat, 15 Feb 2020 12:24:34 +0000 (13:24 +0100)
.github/workflows/deploy-docs.yml [new file with mode: 0644]

diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml
new file mode 100644 (file)
index 0000000..18b4747
--- /dev/null
@@ -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 }}