Skip to content

Instantly share code, notes, and snippets.

@imlautaro
Last active October 10, 2023 22:02
Show Gist options
  • Save imlautaro/9bd9fab7b180ccd6844a9001cd46e111 to your computer and use it in GitHub Desktop.
Save imlautaro/9bd9fab7b180ccd6844a9001cd46e111 to your computer and use it in GitHub Desktop.
Workflow to deploy a Nuxt 3 app to GitHub Pages with NPM
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: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install & Generate 🔧
run: |
npm ci
npm run 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