mirror of
https://github.com/kennethreitz/instructor.git
synced 2026-06-05 22:50:18 +00:00
46 lines
923 B
YAML
46 lines
923 B
YAML
name: Deploy MkDocs
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: 3.x
|
|
|
|
- name: Store cache_id
|
|
run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
|
|
|
|
- name: Setup cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
key: mkdocs-material-${{ env.cache_id }}
|
|
path: .cache
|
|
restore-keys: |
|
|
mkdocs-material-
|
|
|
|
- name: Install Requirements
|
|
run: |
|
|
sudo apt-get update &&
|
|
sudo apt-get install pngquant &&
|
|
pip install -r requirements-doc.txt
|
|
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
|
|
- name: Build and deploy MkDocs
|
|
run: mkdocs gh-deploy --force
|