Skip to content

chore: fix pypi release action #65

chore: fix pypi release action

chore: fix pypi release action #65

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 requirements/base.txt
pip install -r requirements/docs.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 }}/