-
Notifications
You must be signed in to change notification settings - Fork 9
55 lines (46 loc) · 1.36 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
48
49
50
51
52
53
54
55
name: ci
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: 进入任务
uses: actions/checkout@v3
- name: 安装nodejs
uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: 安装依赖
run: npm install
- name: 打包项目
run: yarn run build
- name: 项目部署
uses: easingthemes/[email protected]
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY }}
REMOTE_HOST: ${{ secrets.HOST }}
REMOTE_USER: ${{ secrets.USERNAME }}
REMOTE_POR: '22'
SOURCE: 'build/'
TARGET: ${{ secrets.REMOTE_PATH }}
# ARGS: '-rltgoDzvO'
# - name: 部署项目
# uses: appleboy/[email protected]
# with:
# host: 124.221.253.146
# username: Administrator
# password: zswZSW20001020
# port: 22
# source: '/src/.vuepress/dist'
# target: '/wwwroot/blog'
# - name: 部署项目
# uses: SamKirkland/[email protected]
# with:
# server: ${{ secrets.ftp_server }}
# username: ${{ secrets.ftp_user }}
# password: ${{ secrets.ftp_pwd }}
# local-dir: ./src/.vuepress/dist/
# server-dir: ./