-
Notifications
You must be signed in to change notification settings - Fork 3
73 lines (63 loc) · 1.7 KB
/
deploy-notes.yml
File metadata and controls
73 lines (63 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Deploy notes
# 暂时不启用
on:
push:
branches:
- draft
paths:
- "notes/**"
- ".github/workflows/deploy-notes.yml"
pull_request:
types: [opened, synchronize]
branches:
- draft
paths:
- "notes/**"
permissions:
contents: write
jobs:
deploy-notes:
strategy:
matrix:
os: [ubuntu-latest] # macos-latest, windows-latest
node: [16]
deploy-dir: [notes/.output/public]
deploy-user: [augusmeow]
deploy-repo: [notes]
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: ./notes
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
- name: Change nuxt.config.ts
run: mv nuxt.config.ts.example nuxt.config.ts
- uses: pnpm/action-setup@v6.0.4
name: Install pnpm
id: pnpm-install
# with: # Install only pnpm with packageManager
# version: 7
- name: Install dependencies
run: pnpm install
- name: Generate
env:
BASE: /${{ matrix.deploy-repo }}/
NUXT_APP_BASE_URL: /${{ matrix.deploy-repo }}/
HOSTNAME: https://augusmeow.github.io/
NODE_OPTIONS: --max_old_space_size=4096
run: pnpm generate
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v5.0.0
with:
repo: ${{ matrix.deploy-user }}/${{ matrix.deploy-repo }}
target_branch: gh-pages
build_dir: ${{ matrix.deploy-dir }}
jekyll: false
env:
GH_PAT: ${{ secrets.DEPLOY_GH }}