chore(github): update workflows

This commit is contained in:
Benjamin Canac
2025-01-07 11:17:12 +01:00
parent 61389b8b5a
commit fd5a529565
2 changed files with 16 additions and 5 deletions

48
.github/workflows/docs.yml vendored Normal file
View File

@@ -0,0 +1,48 @@
name: docs
on:
push:
branches:
- v3
pull_request:
branches:
- v3
jobs:
deploy:
name: "Deploy docs to NuxtHub"
runs-on: ubuntu-latest
environment:
name: ${{ github.ref == 'refs/heads/v3' && 'production' || 'preview' }}
url: ${{ steps.deploy.outputs.deployment-url }}
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Prepare build
run: pnpm dev:prepare
- name: Build application
run: pnpm docs:build
- name: Deploy to NuxtHub
uses: nuxt-hub/action@v1
id: deploy
with:
project-key: ui-7eg3
directory: docs/dist