Skip to content

Update ci-docs.yml

Update ci-docs.yml #2

Workflow file for this run

name: Homepage Docs Build & Deploy
on:
push:
tags: [ 'v*.*.*' ]
branches: ['main']
workflow_dispatch:
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- uses: actions/setup-python@v4
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: sudo apt-get install pngquant
- run: pip install mike
- run: pip install git+https://${GH_TOKEN}@github.com/benphelps/mkdocs-material-insiders.git
- name: Mike Deploy for Tags
if: github.ref != 'refs/heads/main'
run: mike deploy --push ${{github.ref_name}} latest
- name: Mike Deploy for Main
if: github.ref == 'refs/heads/main'
run: mike deploy --push main main
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}