add preview function #104
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Setup Python | |
uses: actions/[email protected] | |
with: | |
python-version: 3.11 | |
- name: install dependencies | |
run: pip3 install numpy loguru rich flask sphinx-rtd-theme wheel | |
- run: python3 setup.py install | |
- name: Build website | |
run: | | |
python3 setup.py bdist_wheel | |
cp ./dist/*.whl ./website/static | |
- uses: actions/upload-pages-artifact@v1 | |
with: | |
path: "./website/static" | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/deploy-pages@v1 | |
id: deployment |