Skip to content

Fix simple-physics-demo-with-debug-bounds demo (#46) #108

Fix simple-physics-demo-with-debug-bounds demo (#46)

Fix simple-physics-demo-with-debug-bounds demo (#46) #108

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request: {}
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
build-job:
runs-on: ubuntu-latest
# Cancel multiple runs when pushing to main
concurrency:
group: ${{ github.event_name != 'pull_request' && 'group-pushmain' || github.run_id }}
cancel-in-progress: ${{ github.event_name != 'pull_request' }}
# container:
# image: ghcr.io/pmndrs/playwright:main
# credentials:
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
steps:
# Build
- uses: actions/checkout@v4
- id: configurepages
uses: actions/configure-pages@v5
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- run: npm ci
- uses: rharkor/caching-for-turbo@v1.5
- run: npm run build
env:
BASE_PATH: ${{ steps.configurepages.outputs.base_path }}
PUBLIC_URL: ${{ steps.configurepages.outputs.base_url }}
# Tests (only for PRs)
- run: ./test.sh
if: github.event_name == 'pull_request'
env:
BASE_PATH: ${{ steps.configurepages.outputs.base_path }}
# Upload artifact (only for pushes on main)
- uses: actions/upload-pages-artifact@v3
if: github.event_name != 'pull_request'
with:
path: ./out${{ steps.configurepages.outputs.base_path }}
deploy-job:
# only for pushes on main
if: github.event_name != 'pull_request'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build-job
steps:
- id: deployment
uses: actions/deploy-pages@v4