Skip to content

Commit

Permalink
ready to test github page documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengp0 committed Apr 13, 2024
1 parent c79f6cd commit e4b4ad3
Showing 1 changed file with 32 additions and 27 deletions.
59 changes: 32 additions & 27 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,31 @@ permissions:
contents: write

jobs:
pypi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: python -m pip install build . --upgrade pip
- name: Build package distribution
run: python -m build --sdist --wheel --outdir dist/ .
- name: Publish package distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip_existing: true
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
# pypi:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Set up Python 3.12
# uses: actions/setup-python@v5
# with:
# python-version: "3.12"
# - name: Install dependencies
# run: python -m pip install build . --upgrade pip
# - name: Build package distribution
# run: python -m build --sdist --wheel --outdir dist/ .
# - name: Publish package distribution to PyPI
# if: startsWith(github.ref, 'refs/tags')
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# skip_existing: true
# user: __token__
# password: ${{ secrets.PYPI_API_TOKEN }}

docs:
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
Expand All @@ -41,13 +44,15 @@ jobs:
run: python -m pip install .[docs] --upgrade pip
- name: Generate API docs & Build sphinx documentation
run: |
git fetch --tags
cd docs
make clean
make html
cd ..
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
python build.py
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
branch: gh-pages # The branch the action should deploy to.
folder: docs/_build/html # The folder the action should deploy.
ssh-key: ${{ secrets.DEPLOY_KEY }}
path: './pages'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit e4b4ad3

Please sign in to comment.