File tree 2 files changed +35
-15
lines changed
2 files changed +35
-15
lines changed Original file line number Diff line number Diff line change
1
+ name: GitHub Actions Build and Deploy Project
2
+ on:
3
+ push:
4
+ branches:
5
+ - master
6
+ jobs:
7
+ build-and-deploy:
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - name: Checkout
11
+ uses: actions/checkout@master
12
+
13
+ - name: Build and Deploy
14
+ uses: JamesIves/github-pages-deploy-action@releases/v2
15
+ env:
16
+ ACCESS_TOKEN: ${{ secrets.MY_DEPLOY_KEY }}
17
+ BASE_BRANCH: master # The branch the action should deploy from.
18
+ BRANCH: release # The branch the action should deploy to.
19
+ FOLDER: dist # The folder the action should deploy.
20
+ BUILD_SCRIPT: yarn && yarn build
21
+ - name: Deploy
22
+ uses: appleboy/ssh-action@master # 使用ssh链接服务器
23
+ with: #登录服务器,git 下载 release 分支
24
+ host: ${{ secrets.REMOTE_HOST }}
25
+ username: ${{ secrets.REMOTE_USER }}
26
+ password: ${{ secrets.REMOTE_PASSWORD }}
27
+ port: ${{ secrets.REMOTE_PORT }}
28
+ script: |
29
+ rm -rf /data/www/temp
30
+ mkdir /data/www/temp
31
+ cd /data/www/temp
32
+ git clone -b release https://github.com/ibwei/vue3-ts-base.git
33
+ cd /data/www/temp/vue3-ts-base
34
+ rm -rf /data/www/vue3/*
35
+ mv ./* /data/www/vue3
Original file line number Diff line number Diff line change 18
18
BRANCH : release # The branch the action should deploy to.
19
19
FOLDER : dist # The folder the action should deploy.
20
20
BUILD_SCRIPT : yarn && yarn build
21
- - name : Deploy
22
- uses : appleboy/ssh-action@master # 使用ssh链接服务器
23
- with : # 登录服务器,git 下载 release 分支
24
- host : ${{ secrets.REMOTE_HOST }}
25
- username : ${{ secrets.REMOTE_USER }}
26
- password : ${{ secrets.REMOTE_PASSWORD }}
27
- port : ${{ secrets.REMOTE_PORT }}
28
- script : |
29
- rm -rf /data/www/temp
30
- mkdir /data/www/temp
31
- cd /data/www/temp
32
- git clone -b release https://github.com/ibwei/vue3-base.git
33
- cd /data/www/temp/vue3-base
34
- rm -rf /data/www/vue3/*
35
- mv ./* /data/www/vue3
You can’t perform that action at this time.
0 commit comments