From bb0e66cd8b20758698f1673003566939c2801326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=A2=E3=83=AC=E3=82=AF=E3=82=B5=E3=83=B3=E3=83=80?= =?UTF-8?q?=E3=83=BC=2Eeth?= Date: Sun, 25 Feb 2024 03:01:44 +0900 Subject: [PATCH] chore: test why secrets are not being passed in --- .github/workflows/build.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4048613a..e1be4b01 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,7 @@ name: Build & Deploy on: push: - pull_request: + pull_request_target: # Changed from pull_request to pull_request_target workflow_dispatch: permissions: @@ -15,8 +15,13 @@ jobs: steps: - name: Check out repository uses: actions/checkout@v4 - # with: - # submodules: "recursive" # Ensures submodules are checked out + with: + ref: ${{ github.event.pull_request.base.ref }} # Check out the base branch, not the PR + + - name: Fetch PR code + run: | + git fetch origin ${{ github.event.pull_request.head.sha }} + git checkout FETCH_HEAD - name: Set up Node.js uses: actions/setup-node@v4 @@ -41,12 +46,9 @@ jobs: APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }} - name: Deploy to Cloudflare - if: env.skip != 'true' uses: ubiquity/cloudflare-deploy-action@main with: repository: ${{ github.repository }} production_branch: ${{ github.event.repository.default_branch }} output_directory: "static" - current_branch: ${{ github.ref_name }} - pull_request_number: ${{ github.event.pull_request.number }} - commit_sha: ${{ github.event.pull_request.head.sha }} + current_branch: ${{ github.ref_name }} \ No newline at end of file