Unverified Commit 80f04079 authored by ZiJian Zhang's avatar ZiJian Zhang Committed by GitHub
Browse files

Merge branch 'SUSTC:master' into master

parents 32b4d4d0 a17dc891
Loading
Loading
Loading
Loading
+41 −18
Original line number Diff line number Diff line
name: Build and Deploy
on:
  push:
    branches:
      - master
on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-latest
    name: A job to deploy SUSTech Online.
    name: Build site
    steps:
    - name: Checkout
      uses: actions/checkout@v2
@@ -23,7 +20,12 @@ jobs:

    - uses: actions/setup-node@v2
      with:
        node-version: '14'
        node-version: '16'

    - name: Check yarn / node version
      run: |
        echo "yarn version `yarn --version`"
        echo "node version `node -v`"

    - name: Install Dependencies
      run: yarn install
@@ -31,7 +33,28 @@ jobs:
    - name: Build Site
      run: yarn docs:build

    - name: Deploy
    - name: Upload artifact
      uses: actions/upload-artifact@v2
      with:
        name: 'sustech-online-build'
        path: './docs/.vuepress/dist/'

  deploy:
    name: Deploy site
    runs-on: "ubuntu-latest"
    needs: build
    if: always() && github.repository_owner == 'SUSTC' && github.ref == 'refs/heads/master'
    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: Deploy to GitHub page
      uses: peaceiris/actions-gh-pages@v3
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -39,17 +62,17 @@ jobs:
        publish_dir: ./docs/.vuepress/dist/
        force_orphan: true

    - name: Deploy to coding
      uses: liziwl/git-push-action@v1.0.4
      with:
        git_token_holder: 'pt5ez622q7ct'
        git_token: '${{ secrets.CODING_TOKEN }}'
        commit_user: 'liziwl'
        commit_email: 'leezisy@gmail.com'
        push_dir: './docs/.vuepress/dist/'
        repository_url: 'e.coding.net/liziwl/sustech-online/sustech-online-pages.git'
        keep_history: false
        branch: master
    # - name: Deploy to coding
    #   uses: liziwl/git-push-action@v1.0.4
    #   with:
    #     git_token_holder: 'pt5ez622q7ct'
    #     git_token: '${{ secrets.CODING_TOKEN }}'
    #     commit_user: 'liziwl'
    #     commit_email: 'leezisy@gmail.com'
    #     push_dir: './docs/.vuepress/dist/'
    #     repository_url: 'e.coding.net/liziwl/sustech-online/sustech-online-pages.git'
    #     keep_history: false
    #     branch: master

    - name: copy file to server PVG
      uses: appleboy/scp-action@master

.idea/.gitignore

0 → 100644
+5 −0
Original line number Diff line number Diff line
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/

.idea/modules.xml

0 → 100644
+8 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectModuleManager">
    <modules>
      <module fileurl="file://$PROJECT_DIR$/.idea/sustech-online-ng.iml" filepath="$PROJECT_DIR$/.idea/sustech-online-ng.iml" />
    </modules>
  </component>
</project>
 No newline at end of file
+12 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
  <component name="NewModuleRootManager">
    <content url="file://$MODULE_DIR$">
      <excludeFolder url="file://$MODULE_DIR$/temp" />
      <excludeFolder url="file://$MODULE_DIR$/.tmp" />
      <excludeFolder url="file://$MODULE_DIR$/tmp" />
    </content>
    <orderEntry type="inheritedJdk" />
    <orderEntry type="sourceFolder" forTests="false" />
  </component>
</module>
 No newline at end of file

.idea/vcs.xml

0 → 100644
+6 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="VcsDirectoryMappings">
    <mapping directory="$PROJECT_DIR$" vcs="Git" />
  </component>
</project>
 No newline at end of file
Loading