Skip to content

Commit 567a492

Browse files
committed
feat: added github action for docs deployment
1 parent 2b501b2 commit 567a492

File tree

4 files changed

+47
-3
lines changed

4 files changed

+47
-3
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
name: Nuxt [Validate]
32
env:
43
node_version: 20

.github/workflows/docs.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Nuxt [Docs]
2+
env:
3+
node_version: 20
4+
concurrency:
5+
group: "pages"
6+
cancel-in-progress: false
7+
on:
8+
push:
9+
branches: ["main"]
10+
workflow_dispatch:
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: ${{ env.node_version }}
25+
- name: Enable corepack
26+
run: corepack enable
27+
- name: Install dependencies
28+
working-directory: ./docs
29+
run: npx nypm@latest i
30+
- name: Generate documentation
31+
run: pnpm generate
32+
working-directory: ./docs
33+
- name: Upload artifact
34+
uses: actions/upload-pages-artifact@v3
35+
working-directory: ./docs
36+
with:
37+
path: .output/public
38+
deploy:
39+
environment:
40+
name: github-pages
41+
url: ${{ steps.deployment.outputs.page_url }}
42+
runs-on: ubuntu-latest
43+
needs: build
44+
steps:
45+
- name: Deploy to GitHub Pages
46+
id: deployment
47+
uses: actions/deploy-pages@v4

.github/workflows/prerelease.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
name: Nuxt [Pre-Release]
32
env:
43
node_version: 20

.github/workflows/release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
name: Nuxt [Release]
32
env:
43
node_version: 20

0 commit comments

Comments
 (0)