Skip to content

Build and Deploy to GitHub Pages #138

Build and Deploy to GitHub Pages

Build and Deploy to GitHub Pages #138

Workflow file for this run

name: Build and Deploy to GitHub Pages
on:
push:
branches: [main]
workflow_run:
workflows: ["Update Nebraska Events GPX"]
types: [completed]
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-slim
if: github.event.workflow_run.conclusion == 'success' || github.event_name != 'workflow_run'
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: 24
cache: npm
- name: Install dependencies
run: npm ci
- name: Build site
run: npm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v5
with:
path: build
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-slim
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5