generated from will/eec-courses-template
b0279f3fd8
Sync courses / sync (push) Successful in 5s
Wire the sync workflow to eec-sunfloweracres, and add a real four-part welcome/nurture course that also grows the sunfloweracres-list mailing list via signup_list_name. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
27 lines
772 B
YAML
27 lines
772 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-sunfloweracres:8080/admin/sync" \
|
|
-H "Authorization: Bearer ${SUNFLOWERACRES_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:
|
|
SUNFLOWERACRES_EEC_SYNC_TOKEN: ${{ secrets.SUNFLOWERACRES_EEC_SYNC_TOKEN }}
|