Skip to content

Fix GitHub Actions workflow to correctly build and upload the sandbox… #2

Fix GitHub Actions workflow to correctly build and upload the sandbox…

Fix GitHub Actions workflow to correctly build and upload the sandbox… #2

Workflow file for this run

name: Deploy example page
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
- name: Setup Node.js 22
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: pnpm
- name: Install Dependencies
run: pnpm install --ignore-scripts
- name: Cache turbo build setup
uses: actions/cache@v4
with:
path: node_modules/.cache/turbo
key: turbo-${{ github.sha }}
restore-keys: |
turbo-
- name: Build
run: pnpm build
- name: Build site
run: pnpm -dir examples/sandbox build
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: examples/sandbox/dist
deploy:
needs: build
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
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4