-
Notifications
You must be signed in to change notification settings - Fork 2
executable file
·47 lines (40 loc) · 1.19 KB
/
main.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
name: Build
on:
push:
branches:
- dev
- test-ci
- test-ci
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.5.0
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"
- run: pnpm i
- name: Build
run: pnpm build
# - run: "ls ${{ github.workspace}}/blog/.vitepress/dist"
# - name: Deploy Github Pages
# uses: peaceiris/actions-gh-pages@v3
# with:
# github_token: ${{ secrets.TOKEN }}
# publish_dir: blog/dist
# - name: Deploy Serve
# uses: easingthemes/ssh-deploy@main
# env:
# SSH_PRIVATE_KEY: ${{ secrets.SERVER_SSH_KEY }}
# ARGS: "-rltgoDzvO"
# SOURCE: "blog/dist/"
# REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
# REMOTE_USER: ${{ secrets.REMOTE_USER }}
# TARGET: ${{ secrets.REMOTE_TARGET }}
# EXCLUDE: "/node_modules/"
- name: 部署到 CloudBase
run: "npx tcb login --apiKeyId ${{secrets.CLOUDBASE_KEY}} --apiKey ${{secrets.CLOUDBASE_SECRET}} && npm run deploy"