Skip to content

chore: add configure-pages@v5 (#390) #251

chore: add configure-pages@v5 (#390)

chore: add configure-pages@v5 (#390) #251

Workflow file for this run

name: Build & Deploy

Check failure on line 1 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yml

Invalid workflow file

(Line: 55, Col: 9): Unexpected value 'environment'
on:
push:
branches: ['main']
pull_request:
branches: ['main']
# Least-privilege permissions for Pages
permissions:
contents: read
pages: write
id-token: write
# Avoid overlapping deployments
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '24.2.0'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
# Only deploy on push to main
- name: Configure Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/configure-pages@v5
- name: Upload Pages artifact
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v3
with:
path: ./dist
- name: Deploy to GitHub Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
id: deployment
uses: actions/deploy-pages@v4
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}