update workflow

This commit is contained in:
ClovertaTheTrilobita 2026-03-26 10:47:12 +02:00
parent d8034d7897
commit d1b1dd96ce

View file

@ -15,12 +15,29 @@ on:
- '.github/workflows/deploy-blog.yml' - '.github/workflows/deploy-blog.yml'
workflow_dispatch: workflow_dispatch:
discussion:
types: [created, category_changed]
discussion_comment:
types: [created, edited, deleted]
concurrency: concurrency:
group: deploy-blog group: deploy-blog
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
build-and-deploy: build-and-deploy:
if: >
github.event_name == 'push' ||
github.event_name == 'workflow_dispatch' ||
(
github.event_name == 'discussion' &&
github.event.discussion.category.slug == 'comments'
) ||
(
github.event_name == 'discussion_comment' &&
github.event.discussion.category.slug == 'comments'
)
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
@ -30,8 +47,10 @@ jobs:
DEPLOY_USER: ${{ vars.DEPLOY_USER }} DEPLOY_USER: ${{ vars.DEPLOY_USER }}
steps: steps:
- name: Checkout - name: Checkout blog-content branch
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
ref: blog-content
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v4 uses: actions/setup-node@v4