-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (34 loc) · 1.01 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
name: kenan actions
on:
push:
branches: [ "main" ]
# Environment variables available to all jobs and steps in this workflow
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
environment: production
steps:
- name: Checkout
uses: actions/checkout@v4
- name: node install
uses: actions/[email protected]
with:
# Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0.
node-version: "20.X" # optional
- name: INSTALL NODE MODULES
run: npm i
- name: Build
run: npm run build
- name: copy dist file with scp
uses: appleboy/[email protected]
with:
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.REMOTE_USER }}
password: ${{ secrets.REMOTE_PASS }}
port: 22
source: 'dist/'
script: |
cd /www/wwwroot/8.152.0.253/something0408 # 替换为您的项目在服务器上的位置
git pull origin main # 拉取最新代码