feat: version polling #18
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: CI | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
CI: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
# vite 需要在node>=12 的环境下执行 | |
# puppeteer 需要在node>=14.1.0 的环境下执行 | |
node-version: '16.14.1' | |
# 下载pnpm | |
- name: Install pnpm | |
run: | |
npm install -g pnpm | |
# 确保 pnpm-lock.yaml 与 package.json 保持同步。 | |
- name: Install dependencies | |
run: pnpm install --no-frozen-lockfile | |
# - name: Cache | |
# id: cache-dependencies | |
# uses: actions/cache@v3 | |
# with: | |
# path: | | |
# **/node_modules | |
# key: ${{runner.OS}}-${{hashFiles('**/pnpm-lock.yaml')}} | |
- name: Installing Dependencies | |
run: pnpm install | |
- name: Running Lint | |
run: pnpm run build | |
- name: Deploy to Staging My server | |
uses: easingthemes/[email protected] | |
env: | |
#私钥 | |
SSH_PRIVATE_KEY: ${{ secrets.ID_RSA_PUB }} | |
ARGS: '-rltgoDzvO' | |
SOURCE: 'dist' | |
REMOTE_HOST: ${{ secrets.TASK_IP }} #服务器ip | |
REMOTE_USER: 'root' | |
TARGET: '/usr/local/react/' | |
EXCLUDE: '/node_modules/' |