Skip to content

Deploy to GitHub Pages #2421

Deploy to GitHub Pages

Deploy to GitHub Pages #2421

Workflow file for this run

name: Deploy to GitHub Pages
on:
schedule:
- cron: "25 6 * * *" # Daily at 06:25 UTC
workflow_dispatch:
push:
branches: [production]
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build Website
runs-on: ubuntu-latest
permissions:
artifact-metadata: write # Needed to store the built website artifact
contents: read
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUXT_PUBLIC_SITE_URL: https://www.babdev.com
steps:
- name: Checkout Code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Enable Corepack
run: corepack enable
- name: Setup Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "24"
cache: "pnpm"
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Run Nuxt Build
run: pnpm exec nuxt build --preset github_pages
- name: Upload Artifact
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: ./.output/public
deploy:
name: Deploy Website
needs: build
runs-on: ubuntu-latest
permissions:
pages: write # Needed to publish the website
id-token: write # Needed to publish the website
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0