From fab12d5868be8d3b0dc7ffefd2caeae376d853af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Sat, 15 Feb 2020 13:39:10 +0100 Subject: [PATCH] :construction_worker: Add GitHub action to deploy docs (#50) --- .github/workflows/deploy-docs.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/deploy-docs.yml diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml new file mode 100644 index 0000000..18b4747 --- /dev/null +++ b/.github/workflows/deploy-docs.yml @@ -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 }}