Skip to content

studio nuxt build

studio nuxt build #106

Workflow file for this run

name: studio-nuxt-build
run-name: studio nuxt build
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
pull_request:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Add write workflow permissions
permissions:
contents: write
# Allow one concurrent deployment
concurrency:
group: "pages-${{ github.ref }}"
cancel-in-progress: true
jobs:
# Build job
build-and-deploy:
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: .starters/default
strategy:
matrix:
os: [ubuntu-latest]
node: [18]
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Install @nuxthq/studio
run: pnpm add -D @nuxthq/studio
- name: Create .nuxtrc
run: echo 'modules[]=@nuxthq/studio' > .nuxtrc
- name: Generate
run: pnpm nuxi generate
env:
NUXT_PUBLIC_STUDIO_API_URL: https://api.nuxt.studio
NUXT_PUBLIC_STUDIO_TOKENS: e6364305a88b20d5fc79b360230231dd743831dff03b55edd6b4237b355bb7d9
- name: Add .nojekyll file
run: touch .output/public/.nojekyll
# Deployment job
- name: Deploy 🚀
if: github.ref == 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: .starters/default/.output/public