From e66858219c33427947d89d660396b0858f485fb1 Mon Sep 17 00:00:00 2001 From: JoanneHing Date: Sun, 9 Feb 2025 15:52:59 +0800 Subject: [PATCH 1/2] Add CI check to PR --- .github/workflows/main.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 38eb69959..ab441f413 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,7 @@ name: CI -on: +on: + pull_request: push: branches: - master @@ -13,23 +14,27 @@ on: # - cron: '0 0 * * *' jobs: - deploy: + build: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 + - name: Install dependencies run: pip install requests + - name: Generate report run: | export VITE_BASE_DIR="/$(basename $GITHUB_REPOSITORY)/" echo "VITE_BASE_DIR: $VITE_BASE_DIR" ./run.sh + - name: Deploy GitHub pages + if : github.event_name == 'push' && github.ref == 'refs/heads/master' uses: peaceiris/actions-gh-pages@v3 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./reposense-report - user_name: 'github-actions[bot]' - user_email: 'github-actions[bot]@users.noreply.github.com' - commit_message: Rebuild pages at + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./reposense-report + user_name: 'github-actions[bot]' + user_email: 'github-actions[bot]@users.noreply.github.com' + commit_message: Rebuild pages at ${{ github.sha }} From 473266441c53c68af227a94c4a40c740c97b4f33 Mon Sep 17 00:00:00 2001 From: JoanneHing Date: Sun, 9 Feb 2025 16:43:58 +0800 Subject: [PATCH 2/2] Fix indentation --- .github/workflows/main.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ab441f413..08bac9f18 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,8 +33,8 @@ jobs: if : github.event_name == 'push' && github.ref == 'refs/heads/master' uses: peaceiris/actions-gh-pages@v3 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./reposense-report - user_name: 'github-actions[bot]' - user_email: 'github-actions[bot]@users.noreply.github.com' - commit_message: Rebuild pages at ${{ github.sha }} + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./reposense-report + user_name: 'github-actions[bot]' + user_email: 'github-actions[bot]@users.noreply.github.com' + commit_message: Rebuild pages at