Skip to content

chore: add formatting and linting configuration #77

chore: add formatting and linting configuration

chore: add formatting and linting configuration #77

Workflow file for this run

name: build-and-deploy
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages-${{ github.ref }}"
cancel-in-progress: false
jobs:
build:
runs-on: macos-latest
permissions:
contents: read
steps:
- name: Debug - Show event info
run: |
echo "Event name: ${{ github.event_name }}"
echo "Ref: ${{ github.ref }}"
echo "SHA: ${{ github.sha }}"
echo "Actor: ${{ github.actor }}"
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.13'
cache: 'pip' # caching pip dependencies
- name: Install dependencies and run generator
run: |
echo "Installing dependencies..."
pip install -r requirements.txt
echo "Running spec generator..."
python spec-generator/main.py
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
# Upload the contents of the dist directory
path: 'dist'
deploy:
needs: build
# Only run deployment on main branch
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Debug - Show deployment info
run: |
echo "Deploying to GitHub Pages..."
echo "Environment: ${{ github.event.environment }}"
echo "Workflow run ID: ${{ github.run_id }}"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4