From c54b1f42f54a7cdf0160f8f0d2900c74cf7b9a96 Mon Sep 17 00:00:00 2001 From: Gleb Arestov Date: Thu, 15 Oct 2026 18:11:15 +0400 Subject: [PATCH 1/2] fix(ci): trigger website rebuilds on version tags --- .github/workflows/api.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/api.yml b/.github/workflows/api.yml index 2f0ff00..78e4af3 100644 --- a/.github/workflows/api.yml +++ b/.github/workflows/api.yml @@ -1,13 +1,29 @@ name: Update API on: - create: + push: tags: - '*.*.*' permissions: {} jobs: api: + if: github.event.deleted == false runs-on: ubuntu-latest + timeout-minutes: 5 steps: - - name: Start logux.org re-build + - name: Request a logux.org rebuild + env: + DEPLOY_USER: ${{ secrets.DEPLOY_USER }} + DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }} run: | - curl -XPOST -u "${{ secrets.DEPLOY_USER }}:${{ secrets.DEPLOY_TOKEN }}" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/logux/logux.org/dispatches --data '{"event_type": "deploy"}' + if [ -z "$DEPLOY_USER" ] || [ -z "$DEPLOY_TOKEN" ]; then + echo '::error::Set DEPLOY_USER and DEPLOY_TOKEN with repository dispatch access to logux/logux.org.' + exit 1 + fi + curl --fail-with-body --silent --show-error \ + --connect-timeout 10 --max-time 60 \ + --request POST \ + --user "$DEPLOY_USER:$DEPLOY_TOKEN" \ + --header 'Accept: application/vnd.github+json' \ + --header 'Content-Type: application/json' \ + https://api.github.com/repos/logux/logux.org/dispatches \ + --data '{"event_type":"deploy"}' From c6aaaa59ea445580888865aa10408389a49331b6 Mon Sep 17 00:00:00 2001 From: Andrey Sitnik Date: Thu, 15 Oct 2026 21:45:52 +0200 Subject: [PATCH 2/2] Remove unnecessary check --- .github/workflows/api.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/api.yml b/.github/workflows/api.yml index 78e4af3..7f25d5b 100644 --- a/.github/workflows/api.yml +++ b/.github/workflows/api.yml @@ -6,7 +6,6 @@ on: permissions: {} jobs: api: - if: github.event.deleted == false runs-on: ubuntu-latest timeout-minutes: 5 steps: