-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (52 loc) · 1.38 KB
/
deploy.yml
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
name: ci-deploy
on:
push:
branches:
- master
- main
pull_request:
types: [opened, synchronize]
branches:
- master
- main
jobs:
deploy:
strategy:
matrix:
os: [ubuntu-latest] # macos-latest, windows-latest
node: [16]
deploy-dir: [.vitepress/dist]
deploy-user: [sanhvvt]
deploy-repo: [sanhvvt.github.io]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- uses: pnpm/[email protected]
name: Install pnpm
id: pnpm-install
with:
version: 7
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: Generate
env:
# BASE: /
# NUXT_APP_BASE_URL: /${{ matrix.deploy-repo }}/
# HOSTNAME: https://sanhvvt.github.io/
NODE_OPTIONS: --max_old_space_size=4096
run: pnpm build
- name: Deploy to GitHub Pages
uses: crazy-max/[email protected]
with:
# repo: ${{ matrix.deploy-user }}/${{ matrix.deploy-repo }}
target_branch: gh-pages
build_dir: ${{ matrix.deploy-dir }}
jekyll: false
env:
GITHUB_TOKEN: ${{ secrets.DEPLOY_GH }}