Skip to content

Commit

Permalink
update action (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lomet authored Dec 22, 2024
1 parent c158cee commit 3008224
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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."

0 comments on commit 3008224

Please sign in to comment.