Files
will 90961ee7e4
Sync courses / sync (push) Failing after 5s
Fill in client-specific values from eec-courses-template
Swaps __CLIENT__/__DOMAIN__ placeholders for twosquirrelspress/
eec-twosquirrelspress/twosquirrelspress.com.
2026-07-24 07:41:45 -04:00

27 lines
784 B
YAML

name: Sync courses
on:
push:
branches: [master]
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Package and sync
run: |
tar czf /tmp/courses.tar.gz courses
status=$(curl -s -o /tmp/sync-response.json -w '%{http_code}' \
-X POST "http://eec-twosquirrelspress:8080/admin/sync" \
-H "Authorization: Bearer ${TWOSQUIRRELSPRESS_EEC_SYNC_TOKEN}" \
--data-binary @/tmp/courses.tar.gz)
cat /tmp/sync-response.json
echo
if [ "$status" -ge 300 ]; then
echo "sync failed with status $status"
exit 1
fi
env:
TWOSQUIRRELSPRESS_EEC_SYNC_TOKEN: ${{ secrets.TWOSQUIRRELSPRESS_EEC_SYNC_TOKEN }}