From 300822436e15869b9d38f5e0ec9c3df2541809fb Mon Sep 17 00:00:00 2001 From: Stan Goldin <48094744+Lomet@users.noreply.github.com> Date: Sun, 22 Dec 2024 15:24:41 +0200 Subject: [PATCH] update action (#5) --- .github/workflows/deploy.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c9bd721..f30e9f0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -4,9 +4,13 @@ on: push: branches: - master # Adjust if your default branch is named differently, e.g., main + issues: + types: + - opened # Trigger the workflow when an issue is opened jobs: build: + if: github.event_name == 'issues' && github.event.issue.body == 'Update' || github.event_name == 'push' runs-on: ubuntu-latest steps: @@ -24,7 +28,7 @@ jobs: # Step 4: Build the project (generate JSON files and copy index.html) - name: Build project - run: npm run generate # This should generate the `serve` folder + run: npm run generate # This should generate the `dist` folder # Step 5: Upload static files as artifact - name: Upload artifact for deployment @@ -48,3 +52,11 @@ jobs: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 + + # Step 7: Close the issue + - name: Close Issue + if: github.event_name == 'issues' + uses: peter-evans/close-issue@v3 + with: + issue-number: ${{ github.event.issue.number }} + comment: "Issue processed and auto-closed."