Files
instructor/.github/workflows/mkdocs.yml
T
Workflow config file is invalid. Please check your config file: invalid jobs: input node is not a mapping node
Jason Liu 73a7410e2c add tags
2023-11-06 22:19:16 -05:00

53 lines
1.2 KiB
YAML

name: Deploy MkDocs
on:
push:
branches:
- main
permissions:
contents: write
jjobs:
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: Calculate requirements hash
id: req-hash
run: echo "::set-output name=hash::$(sha256sum requirements-doc.txt | awk '{print $1}')"
- name: Setup cache
uses: actions/cache@v3
with:
key: mkdocs-material-${{ steps.req-hash.outputs.hash }}
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: Get current tag
id: get-tag
run: echo "::set-output name=version::$(git describe --tags --abbrev=0)"
- name: Build and deploy with mike
run: mike deploy --update-aliases ${{ steps.get-tag.outputs.version }} latest
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}