Skip to content

init more docs stuff #13

init more docs stuff

init more docs stuff #13

# Release python package if '[release]' is in commit
# build docs and deploy to github pages
name: Upload Python Package
on: [push]
permissions:
contents: read
pages: write
id-token: write
jobs:
deploy-main:
if: "contains(github.event.head_commit.message, '[release]')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node20
uses: actions/setup-node@v1
with:
node-version: 20.x
- name: Change dir
run: |
cd docs
npm install
npm run build
cd ..
- name: Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
BRANCH: gh-pages
FOLDER: dist