fix: gha run on tag #107
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: ci | |
on: | |
push: | |
branches: | |
- main # Push events from main branch | |
tags: | |
- 'v*' # Push events matching v*, i.e. v1.0, v20.15.10 | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
if: github.event.repository.fork == false | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- uses: actions/cache@v2 | |
with: | |
key: ${{ github.ref }} | |
path: .cache | |
- run: sudo apt-get install -y libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev pngquant | |
- run: pip install git+https://${{ secrets.MK_TOKEN }}@github.com/squidfunk/mkdocs-material-insiders.git | |
- run: pip install mkdocs-git-revision-date-localized-plugin cairosvg mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin mkdocs-material[imaging] | |
- run: CI=true INSIDERS=true mkdocs build | |
- run: CI=true INSIDERS=true mkdocs gh-deploy --force | |
- uses: montudor/action-zip@v1 | |
with: | |
args: zip -qq -r documentation.zip site | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
${{ github.workspace }}/documentation.zip | |