Skip to content

Commit

Permalink
chore(github): update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincanac committed Jan 7, 2025
1 parent 9bf9357 commit 2050bed
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 14 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ci-v3.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ci-v3
name: build

on:
push:
Expand All @@ -9,7 +9,9 @@ on:
- v3

jobs:
ci:
build:
name: "Build module"

runs-on: ${{ matrix.os }}

permissions:
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@ on:

jobs:
docs:
name: "NuxtHub"
name: "Deploy to NuxtHub"

runs-on: ${{ matrix.os }}

environment:
name: ${{ github.ref == 'refs/heads/v3' && 'production' || 'preview' }}
url: ${{ steps.deploy.outputs.deployment-url }}

permissions:
contents: read
pull-requests: read
Expand All @@ -22,10 +27,6 @@ jobs:
os: [ubuntu-latest] # macos-latest, windows-latest
node: [22]

environment:
name: ${{ github.ref == 'refs/heads/v3' && 'production' || 'preview' }}
url: ${{ steps.deploy.outputs.deployment-url }}

env:
NUXT_GITHUB_TOKEN: ${{ secrets.NUXT_GITHUB_TOKEN }}
NUXT_UI_PRO_LICENSE: ${{ secrets.NUXT_UI_PRO_LICENSE }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,37 +1,56 @@
name: Deploy to NuxtHub
on: push
name: playground

on:
push:
branches:
- v3
pull_request:
branches:
- v3

jobs:
deploy:
name: "Deploy to NuxtHub"
runs-on: ubuntu-latest

runs-on: ${{ matrix.os }}

environment:
name: ${{ github.ref == 'refs/heads/v3' && 'production' || 'preview' }}
url: ${{ steps.deploy.outputs.deployment-url }}

permissions:
contents: read
id-token: write

strategy:
matrix:
os: [ubuntu-latest] # macos-latest, windows-latest
node: [22]

steps:
- uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Install Node.js
- name: Install node
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
node-version: ${{ matrix.node }}
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Prepare build
run: pnpm run dev:prepare

- name: Build application
run: pnpm build
run: pnpm run dev:build

- name: Deploy to NuxtHub
uses: nuxt-hub/action@v1
id: deploy
with:
project-key: ui3-playground-pb9b
directory: playground/dist

0 comments on commit 2050bed

Please sign in to comment.