更新代码 #96
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: prod | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Install Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "16.15.0" | |
- name: 安装yarn | |
run: yarn | |
- name: 安装依赖 | |
run: yarn install | |
- name: 打包 | |
run: yarn build | |
- name: 将打包项目传送到服务器 | |
uses: appleboy/scp-action@master | |
with: | |
source: "antdpro-demo/*" | |
host: ${{ secrets.HOST }} | |
target: "/usr/src/zhoubichuan/prod/" | |
port: ${{ secrets.PORT }} | |
username: ${{ secrets.USER }} | |
password: ${{ secrets.PASSWORD }} |