Skip to content

Deploy to GitHub Pages #2

Deploy to GitHub Pages

Deploy to GitHub Pages #2

Workflow file for this run

name: Deploy to GitHub Pages
on:
# Runs on pushes targeting the default branch
push:
branches: [nuxt]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# 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
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Enable Corepack
run: corepack enable
- name: Setup Node
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version-file: package.json
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Build with Nuxt
env:
NUXT_APP_BASE_URL: /npc-website/
run: pnpm exec nuxt build --preset github_pages
- name: Upload artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
with:
path: ./.output/public
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
uses: actions/[email protected]
id: deployment