From e5661b659b606e587ca3d1ed492beb5a45d35127 Mon Sep 17 00:00:00 2001 From: Xavi Lee Date: Fri, 17 Nov 2023 21:16:05 +0800 Subject: [PATCH] add test for PR --- .github/workflows/main.yml | 4 ++-- .github/workflows/test-pr.yml | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/test-pr.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 769b1d3f14b7..d5289e4ff56a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,7 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install run: | @@ -44,4 +44,4 @@ jobs: staticSrcPath: ./dist bucket: ${{ secrets.BUCKET }} region: ${{ secrets.REGION }} - forceFiles: ${{ secrets.FORCE_FILES }} + forceFiles: ${{ secrets.FORCE_FILES }} diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml new file mode 100644 index 000000000000..08b107a1252a --- /dev/null +++ b/.github/workflows/test-pr.yml @@ -0,0 +1,35 @@ +# This is a basic workflow to help you get started with Actions + +name: PR CI + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: + push: + branches: [cn] + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v4 + + - name: Install + run: | + yarn + yarn clean + + - name: Build + run: | + yarn build + + - name: Check Build + run: | + sudo -i + sudo chown -R $USER ./dist