Skip to content

Deploy

Deploy #3

Workflow file for this run

name: Deploy
on:
push:
branches:
- 'master'
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Enable corepack
run: corepack enable pnpm
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Restore cache
uses: actions/cache@v4
with:
path: |
dist
.nuxt
key: ${{ runner.os }}-nuxt-build-${{ hashFiles('dist') }}
restore-keys: |
${{ runner.os }}-nuxt-build-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Static HTML export with Nuxt
run: pnpm run generate
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./dist
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4