feat: 增强布局组件(同步GI-DEMO),支持更多布局选项并优化布局切换功能 #399
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: Deploy | |
| on: | |
| # 推送时执行 | |
| push: | |
| branches: [dev] | |
| # 可手动执行 | |
| workflow_dispatch: | |
| jobs: | |
| deploy-web: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # 1、检出源码 | |
| - name: Checkout | |
| uses: actions/checkout@master | |
| # 2、安装 PNPM | |
| - name: Setup PNPM | |
| uses: pnpm/action-setup@v2 | |
| with: { version: 9 } | |
| # 3、安装 Node 环境 | |
| - name: Setup Node | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 18 | |
| cache: pnpm | |
| cache-dependency-path: ./pnpm-lock.yaml | |
| # 4、安装依赖 | |
| - name: Install Dependencies | |
| run: pnpm i --frozen-lockfile | |
| # 5、打包 | |
| - name: Build | |
| run: pnpm build | |
| # 6、拷贝到服务器 | |
| - name: Copy | |
| uses: appleboy/scp-action@v0.1.7 | |
| with: | |
| host: ${{ secrets.SERVER_HOST }} | |
| port: ${{ secrets.SERVER_PORT }} | |
| username: ${{ secrets.SERVER_USERNAME }} | |
| password: ${{ secrets.SERVER_PASSWORD }} | |
| source: ./dist/* | |
| target: ${{ secrets.SERVER_TMP_PATH }} | |
| strip_components: 1 | |
| # 7、更新部署文件 | |
| - name: Restart | |
| uses: appleboy/ssh-action@master | |
| with: | |
| host: ${{ secrets.SERVER_HOST }} | |
| port: ${{ secrets.SERVER_PORT }} | |
| username: ${{ secrets.SERVER_USERNAME }} | |
| password: ${{ secrets.SERVER_PASSWORD }} | |
| script: | | |
| rm -rf ${{ secrets.SERVER_PATH }}/* | |
| mv ${{ secrets.SERVER_TMP_PATH }}/* ${{ secrets.SERVER_PATH }} | |
| chmod -R 777 ${{ secrets.SERVER_PATH }} |