Skip to content

Commit ca5080f

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents fd8ae4a + f31f287 commit ca5080f

1 file changed

Lines changed: 89 additions & 0 deletions

File tree

.github/workflows/deploy-docs.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Deploy Docs to GitHub Pages
2+
3+
on:
4+
# Runs on pushes targeting the default branch
5+
push:
6+
branches:
7+
- main
8+
- master
9+
paths:
10+
- 'docs/**'
11+
- '.github/workflows/deploy-docs.yml'
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
16+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
17+
permissions:
18+
contents: read
19+
pages: write
20+
id-token: write
21+
actions: read
22+
23+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
24+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
25+
concurrency:
26+
group: "pages"
27+
cancel-in-progress: false
28+
29+
jobs:
30+
build:
31+
runs-on: ubuntu-latest
32+
defaults:
33+
run:
34+
working-directory: docs
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v4
38+
39+
- name: Setup Node
40+
uses: actions/setup-node@v4
41+
with:
42+
node-version: '20'
43+
44+
- name: Setup pnpm
45+
uses: pnpm/action-setup@v4
46+
with:
47+
version: 11
48+
run_install: false
49+
50+
- name: Get pnpm store directory
51+
shell: bash
52+
run: |
53+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
54+
55+
- name: Setup pnpm cache
56+
uses: actions/cache@v4
57+
with:
58+
path: ${{ env.STORE_PATH }}
59+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
60+
restore-keys: |
61+
${{ runner.os }}-pnpm-store-
62+
63+
- name: Install dependencies
64+
run: cd .. && pnpm install --frozen-lockfile
65+
66+
- name: Setup Pages
67+
uses: actions/configure-pages@v5
68+
69+
- name: Build with Nuxt
70+
run: pnpm generate
71+
env:
72+
NUXT_APP_BASE_URL: /nuxt-ui-formkit/
73+
74+
- name: Upload artifact
75+
uses: actions/upload-pages-artifact@v3
76+
with:
77+
path: ./docs/.output/public
78+
79+
deploy:
80+
environment:
81+
name: github-pages
82+
url: ${{ steps.deployment.outputs.page_url }}
83+
runs-on: ubuntu-latest
84+
needs: build
85+
steps:
86+
- name: Deploy to GitHub Pages
87+
id: deployment
88+
uses: actions/deploy-pages@v4
89+

0 commit comments

Comments
 (0)