Skip to content

Instantly share code, notes, and snippets.

@imlautaro
Last active October 10, 2023 22:02
Show Gist options
  • Save imlautaro/6cebd4fdd882e95931d2b3bca15d703b to your computer and use it in GitHub Desktop.
Save imlautaro/6cebd4fdd882e95931d2b3bca15d703b to your computer and use it in GitHub Desktop.
Workflow to deploy a Nuxt 3 app to GitHub Pages with PNPM
name: Build and Deploy
on:
push:
branches:
- main
permissions:
contents: write
jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: 7
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install & Generate 🔧
run: |
pnpm install
pnpm generate
env:
NUXT_APP_BASE_URL: ${{ vars.NUXT_APP_BASE_URL }}
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment