ci: update yml config
This commit is contained in:
42
.github/workflows/build.yml
vendored
42
.github/workflows/build.yml
vendored
@@ -10,7 +10,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
|
||||
- name: Sync to Gitee
|
||||
uses: x-dr/sync-repo-to-gitee@master
|
||||
env:
|
||||
@@ -21,11 +21,11 @@ jobs:
|
||||
github-repo: "git@github.com:xiaohai2271/blog-frontEnd.git"
|
||||
# 注意替换为你的 Gitee 目标仓库地址
|
||||
gitee-repo: "git@gitee.com:xiaohai2271/blog-frontEnd.git"
|
||||
|
||||
- name: Use Node.js 12.x
|
||||
|
||||
- name: Use Node.js 16.x
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12.x'
|
||||
node-version: '16.x'
|
||||
- run: npm install
|
||||
- run: npm run lint && npm run build:prod
|
||||
- run: cd dist/index/ && tar -cf index.tar ./* && mv index.tar ../../
|
||||
@@ -36,21 +36,21 @@ jobs:
|
||||
name: dist
|
||||
path: ./dist/index/*
|
||||
|
||||
- name: SCP
|
||||
uses: appleboy/scp-action@master
|
||||
with:
|
||||
host: ${{ secrets.SSH_HOST }}
|
||||
username: ${{ secrets.SSH_USERNAME }}
|
||||
password: ${{ secrets.SSH_PASSWORD }}
|
||||
port: ${{ secrets.SSH_PORT }}
|
||||
source: "index.tar"
|
||||
target: "/www/wwwroot/www.celess.cn"
|
||||
# - name: SCP
|
||||
# uses: appleboy/scp-action@master
|
||||
# with:
|
||||
# host: ${{ secrets.SSH_HOST }}
|
||||
# username: ${{ secrets.SSH_USERNAME }}
|
||||
# password: ${{ secrets.SSH_PASSWORD }}
|
||||
# port: ${{ secrets.SSH_PORT }}
|
||||
# source: "index.tar"
|
||||
# target: "/www/wwwroot/www.celess.cn"
|
||||
|
||||
- name: Run SSH command
|
||||
uses: garygrossgarten/github-action-ssh@v0.5.0
|
||||
with:
|
||||
command: cd /www/wwwroot/www.celess.cn && bash deploy.sh
|
||||
host: ${{ secrets.SSH_HOST }}
|
||||
username: ${{ secrets.SSH_USERNAME }}
|
||||
password: ${{ secrets.SSH_PASSWORD }}
|
||||
port: ${{ secrets.SSH_PORT }}
|
||||
# - name: Run SSH command
|
||||
# uses: garygrossgarten/github-action-ssh@v0.5.0
|
||||
# with:
|
||||
# command: cd /www/wwwroot/www.celess.cn && bash deploy.sh
|
||||
# host: ${{ secrets.SSH_HOST }}
|
||||
# username: ${{ secrets.SSH_USERNAME }}
|
||||
# password: ${{ secrets.SSH_PASSWORD }}
|
||||
# port: ${{ secrets.SSH_PORT }}
|
||||
|
||||
Reference in New Issue
Block a user