Skip to content

.github/workflows/main.yml #11

.github/workflows/main.yml

.github/workflows/main.yml #11

Workflow file for this run

on:
workflow_dispatch:
jobs:
my_first_job:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: 安装node
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: 安装项目依赖
working-directory: vue-demos
run: npm install
- name: 打包
working-directory: vue-demos
run: npm run build
- name: Publish
uses: nogsantos/scp-deploy@master
with:
src: vue-demos/mapotato
host: ${{ secrets.SERVER_HOST }}
remote: ${{ secrets.SERVER_PUBLISH_DIR }}
port: ${{ secrets.SERVER_PORT }}
user: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}