Skip to content

Merge branch 'fix/svg-control' into 'main' #13

Merge branch 'fix/svg-control' into 'main'

Merge branch 'fix/svg-control' into 'main' #13

# 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/upload-artifact@v3.1.3
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