Update vip.md #79
This file contains hidden or 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: Build CI | |
| on: [push] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [16.x] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v1 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install npm dependencies | |
| run: npm install | |
| - name: Run build | |
| run: npm run build | |
| - name: Get Path | |
| run: pwd | |
| - name: Zip | |
| run: zip -q -r dist.zip ./dist | |
| - name: Ls | |
| run: ls | |
| - name: 'Copy' | |
| uses: appleboy/scp-action@v0.1.4 | |
| env: | |
| HOST: ${{ secrets.REMOTE_HOST }} | |
| USERNAME: ${{ secrets.REMOTE_USER }} | |
| KEY: ${{ secrets.SSH_PRIVATE_KEY }} | |
| PORT: ${{ secrets.REMOTE_PORT }} | |
| SOURCE: ./dist | |
| TARGET: /www/temp/www | |
| - name: mv | |
| uses: appleboy/ssh-action@master | |
| with: | |
| host: ${{ secrets.REMOTE_HOST }} | |
| username: ${{ secrets.REMOTE_USER }} | |
| key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| port: ${{ secrets.REMOTE_PORT }} | |
| script: | | |
| sudo rm -rf /www/www/* | |
| sudo cp -r -f /www/temp/www/dist/* /www/www | |
| sudo rm -rf /www/temp/www/* |