mirror of
https://github.com/kennethreitz/instructor.git
synced 2026-06-05 22:50:18 +00:00
47 lines
1016 B
YAML
47 lines
1016 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.10'
|
|
|
|
- name: Cache Poetry virtualenv
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ~/.cache/pypoetry/virtualenvs
|
|
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-poetry-
|
|
|
|
- name: Install Poetry
|
|
uses: snok/install-poetry@v1.3.1
|
|
|
|
- name: Install APT packages
|
|
run: |
|
|
sudo apt-get update &&
|
|
sudo apt-get install pngquant
|
|
|
|
- name: Install via Poetry
|
|
run: poetry install --with dev,docs
|
|
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
|
|
- name: Build and deploy MkDocs
|
|
run: poetry run mkdocs gh-deploy --force |