Fix: flattens zip #109
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] | |
- name: Build Website | |
if: startsWith(github.ref, 'refs/tags/') == false | |
run: CI=true INSIDERS=true mkdocs gh-deploy --force | |
- name: Build Offline Version | |
if: startsWith(github.ref, 'refs/tags/') | |
run: CI=true INSIDERS=true mkdocs build | |
- name: Zip Build | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
cd site | |
zip -qq -r ../documentation.zip * | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
${{ github.workspace }}/documentation.zip | |