Skip to content

Use bun as a runtime for the build process #6

Use bun as a runtime for the build process

Use bun as a runtime for the build process #6

Workflow file for this run

name: build-then-deploy
on: [push, pull_request]
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install
- run: bun run build
- run: bun run test
# Only in main branch
- if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v3
with:
path: dist
deploy:
# Only in main branch
if: github.ref == 'refs/heads/main'
needs: build
# 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
cancel-in-progress: false
runs-on: ubuntu-24.04
steps:
- id: deployment
uses: actions/deploy-pages@v4
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}