Skip to content

0.7.0

0.7.0 #10

Workflow file for this run

name: Doc
on:
workflow_dispatch:
release:
types: [published]
workflow_call:
jobs:
build:
if: ${{ !((github.event_name == 'release' && github.event.action == 'published') || github.event_name == 'workflow_dispatch') }}
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Cache node modules
uses: actions/cache@v3
with:
path: node_modules
key: node_modules_ubuntu22_${{ hashFiles('package-lock.json') }}
- name: Cache venv
uses: actions/cache@v3
with:
path: .venv
key: venv_ubuntu22_${{ hashFiles('pdm.lock') }}
- name: Build documentation
run: |
source .venv/bin/activate
npm run build-docs
deploy:
if: ${{ ((github.event_name == 'release' && github.event.action == 'published') || github.event_name == 'workflow_dispatch') }}
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Cache node modules
uses: actions/cache@v3
with:
path: node_modules
key: node_modules_ubuntu22_${{ hashFiles('package-lock.json') }}
- name: Cache venv
uses: actions/cache@v3
with:
path: .venv
key: venv_ubuntu22_${{ hashFiles('pdm.lock') }}
- name: Configure Git
run: |
git config --global user.name "${{ secrets.VIZZUHQ_GITHUB_USER }}"
git config --global user.email "${{ secrets.VIZZUHQ_GITHUB_EMAIL }}"
- name: Deploy documentation
run: |
source .venv/bin/activate
git fetch origin gh-pages || echo "gh-pages does not exist"
npm run deploy-docs
git push origin gh-pages