From f037f1b9d4bff1c30f00e0139069264bbb3d16fd Mon Sep 17 00:00:00 2001 From: pnck Date: Thu, 7 Mar 2024 00:51:56 +0800 Subject: [PATCH] update: external trigger only --- .github/workflows/deploy.yaml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 5df190b..f053d24 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -2,10 +2,8 @@ name: Deploy Pages # Controls when the workflow will run on: - push: - branches: ['main'] - workflow_dispatch: - workflow_call: + repository_dispatch: + types: ['deploy'] # custom event type: 'deploy' # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: @@ -30,17 +28,16 @@ jobs: steps: # Download a build artifact that was previously uploaded in the workflow by the upload-artifact action - name: Download Artifact - uses: dawidd6/action-download-artifact@v3 + uses: actions/download-artifact@v4 with: - github_token: ${{ secrets.GH_TOKEN }} - repo: ${{ secrets.SRC_REPO }} name: public - allow_forks: false - workflow_search: true - workflow_conclusion: success + github-token: ${{ secrets.GH_TOKEN }} + repository: ${{ secrets.SRC_REPO }} + run-id: ${{ github.event.client_payload.run_id }} - name: Extract run: | + ls -lah . mkdir public tar -xf artifact.tar -C public ls -lh public/