Last active
October 28, 2023 15:06
-
-
Save zerolab/8e7fdcb83155a756c3f7d6454a7b2e39 to your computer and use it in GitHub Desktop.
Deploy your mkdocs to NETLIFY
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish docs to Netlify | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
name: Deploy docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout master | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.7' | |
- name: Cache pip | |
uses: actions/cache@v2 | |
with: | |
# This path is specific to Ubuntu | |
path: ~/.cache/pip | |
# Look to see if there is a cache hit for the corresponding requirements file | |
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
${{ runner.os }}- | |
- name: Install dependencies | |
run: pip install -r requirements.txt | |
- name: Build docs | |
run: mkdocs build -d build | |
- name: Deploy docs | |
uses: jsmrcaga/[email protected] | |
with: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
NETLIFY_DEPLOY_TO_PROD: true | |
NETLIFY_DEPLOY_MESSAGE: "Prod deploy v${{ github.ref }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!