Skip to content
Snippets Groups Projects
Commit b3dab417 authored by Stefan Cruz's avatar Stefan Cruz
Browse files

Merge branch 'master' into develop

parents 080b387d 45d118bb
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@
"authorUrl": "https://futo.org",
"sourceUrl": "https://plugins.grayjay.app/Dailymotion/DailymotionConfig.json",
"scriptUrl": "./DailymotionScript.js",
"repositoryUrl": "https://gitlab.futo.org/videostreaming/plugins/dailymotion",
"repositoryUrl": "https://futo.org",
"version": 21,
"iconUrl": "./DailymotionIcon.png",
"id": "9c87e8db-e75d-48f4-afe5-2d203d4b95c5",
......
......@@ -6,7 +6,7 @@
"authorUrl": "https://futo.org",
"sourceUrl": "https://plugins.grayjay.app/Dailymotion/DailymotionConfig.json",
"scriptUrl": "./DailymotionScript.js",
"repositoryUrl": "https://gitlab.futo.org/videostreaming/plugins/dailymotion",
"repositoryUrl": "https://futo.org",
"version": 21,
"iconUrl": "./DailymotionIcon.png",
"id": "9c87e8db-e75d-48f4-afe5-2d203d4b95c5",
......
#!/bin/sh
DOCUMENT_ROOT=/var/www/sources
# Take site offline
echo "Taking site offline..."
touch $DOCUMENT_ROOT/maintenance.file
# Swap over the content
echo "Deploying content..."
mkdir -p $DOCUMENT_ROOT/Dailymotion
cp build/DailymotionIcon.png $DOCUMENT_ROOT/Dailymotion
cp build/DailymotionConfig.json $DOCUMENT_ROOT/Dailymotion
cp build/DailymotionScript.js $DOCUMENT_ROOT/Dailymotion
sh sign.sh $DOCUMENT_ROOT/Dailymotion/DailymotionScript.js $DOCUMENT_ROOT/Dailymotion/DailymotionConfig.json
# Notify Cloudflare to wipe the CDN cache
echo "Purging Cloudflare cache for zone $CLOUDFLARE_ZONE_ID..."
curl -X POST "https://api.cloudflare.com/client/v4/zones/$CLOUDFLARE_ZONE_ID/purge_cache" \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
-H "Content-Type: application/json" \
--data '{"files":["https://plugins.grayjay.app/Dailymotion/DailymotionIcon.png", "https://plugins.grayjay.app/Dailymotion/DailymotionConfig.json", "https://plugins.grayjay.app/Dailymotion/DailymotionScript.js"]}'
# Take site back online
echo "Bringing site back online..."
rm $DOCUMENT_ROOT/maintenance.file
#!/bin/sh
DOCUMENT_ROOT=/var/www/sources
# Take site offline
echo "Taking site offline..."
touch $DOCUMENT_ROOT/maintenance.file
# Swap over the content
echo "Deploying content..."
mkdir -p $DOCUMENT_ROOT/Dailymotion
cp build/DailymotionIcon.png $DOCUMENT_ROOT/Dailymotion
cp build/DailymotionConfig.json $DOCUMENT_ROOT/Dailymotion
cp build/DailymotionScript.js $DOCUMENT_ROOT/Dailymotion
sh sign.sh $DOCUMENT_ROOT/Dailymotion/DailymotionScript.js $DOCUMENT_ROOT/Dailymotion/DailymotionConfig.json
# Notify Cloudflare to wipe the CDN cache
echo "Purging Cloudflare cache for zone $CLOUDFLARE_ZONE_ID..."
curl -X POST "https://api.cloudflare.com/client/v4/zones/$CLOUDFLARE_ZONE_ID/purge_cache" \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
-H "Content-Type: application/json" \
--data '{"files":["https://plugins.grayjay.app/Dailymotion/DailymotionIcon.png", "https://plugins.grayjay.app/Dailymotion/DailymotionConfig.json", "https://plugins.grayjay.app/Dailymotion/DailymotionScript.js"]}'
# Take site back online
echo "Bringing site back online..."
rm $DOCUMENT_ROOT/maintenance.file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment