Commit 5b88934c authored by liziwl's avatar liziwl
Browse files

配置预发测试环境

parent 74a48ef4
Loading
Loading
Loading
Loading
+26 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ jobs:
        name: 'sustech-online-build'
        path: './docs/.vuepress/dist/'

  deploy:
  deploy-on-master:
    name: Deploy site
    runs-on: "ubuntu-latest"
    needs: build
@@ -98,3 +98,28 @@ jobs:
      run: |
        ossutil rm -rf oss://perf-sustech-online/*
        ossutil cp -rf docs/.vuepress/dist/ oss://perf-sustech-online/

  deploy-on-perf:
    name: Deploy site
    runs-on: "ubuntu-latest"
    needs: build
    if: always() && github.repository_owner == 'SUSTech-CRA' && github.ref == 'refs/heads/perf'
    steps:
    - uses: actions/download-artifact@v2
      with:
        name: sustech-online-build
        path: "./docs/.vuepress/dist/"

    - name: Display structure of downloaded files
      run: ls -R
      working-directory: "./docs/.vuepress/dist/"

    - name: copy file to server PVG
      uses: burnett01/rsync-deployments@5.0
      with:
        switches: -avzr --delete
        path: "./docs/.vuepress/dist/"
        remote_path: ${{ secrets.HTML_PATH_PERF }}
        remote_host: ${{ secrets.HOST }}
        remote_user: ${{ secrets.USERNAME }}
        remote_key: ${{ secrets.SSH_KEY }}