Skip to content

chore: add flake8 lint job in github action #28

chore: add flake8 lint job in github action

chore: add flake8 lint job in github action #28

Workflow file for this run

name: Publish docs
permissions:
contents: write
on:
push:
branches:
- main
tags:
- "1.*"
paths-ignore:
- ".github/*"
- "tests/*"
env:
VERSION_PATH: dev
jobs:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
language: [ "en", "zh" ]
steps:
- name: update VERSION_PATH
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: echo VERSION_PATH=v$(echo $GITHUB_REF | cut -d / -f 3 | cut -d . -f 1) >> $GITHUB_ENV
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: install dependencies
run: pip install -r docs/requirements.txt
- name: install self
run: pip install .
- name: sphinx build
run: make build-docs -e lang=${{ matrix.language }}
env:
REF_NAME: ${{ github.ref_name }}
REF_TYPE: ${{ github.ref_type }}
REPOSITORY: ${{ github.repository }}
- name: deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: build/${{ matrix.language }}
target-folder: ${{ matrix.language }}/${{ env.VERSION_PATH }}/