Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions .github/workflows/api.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,28 @@
name: Update API
on:
create:
push:
tags:
- '*.*.*'
permissions: {}
jobs:
api:
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"}'