Merge branch 'fix/svg-control' into 'main' #13
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
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
name: Build Python Package and deploy static page | |
on: | |
# Runs on pushes targeting the default branch | |
push: | |
branches: ["main"] | |
# run can be triggered manually | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: 'Log level' | |
required: true | |
default: 'warning' | |
type: choice | |
options: | |
- info | |
- warning | |
- debug | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
build_deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements-dev.txt | |
pip install build | |
- name: Build package | |
run: python -m build | |
- name: Copy package to 'webgui' | |
run: | | |
mkdir webgui/dist | |
cp dist/*.whl webgui/dist/ | |
- name: Upload a Build Artifact | |
uses: actions/[email protected] | |
with: | |
# Artifact name | |
name: archsim # optional, default is artifact | |
# A file, directory or wildcard pattern that describes what to upload | |
path: dist/*.whl | |
# - name: Release | |
# uses: softprops/action-gh-release@v1 | |
# if: startsWith(github.ref, 'refs/tags/') | |
# with: | |
# files: dist/architecture_simulator-0.1.0-py3-none-any.whl | |
- name: Upload pages artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
# Upload entire repository | |
path: 'webgui' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |