mirror of
https://gitlab.com/futo-org/fcast.git
synced 2025-06-24 21:25:23 +00:00
deploy site with npm install & npm run deploy-site
This commit is contained in:
parent
61f718f6ab
commit
9ea17c46d3
4 changed files with 4 additions and 39 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -2,3 +2,6 @@
|
||||||
|
|
||||||
# Ignore VSCode user project settings
|
# Ignore VSCode user project settings
|
||||||
.vscode
|
.vscode
|
||||||
|
|
||||||
|
node_modules/
|
||||||
|
.wrangler/
|
|
@ -1,7 +1,6 @@
|
||||||
stages:
|
stages:
|
||||||
- buildDockerContainers
|
- buildDockerContainers
|
||||||
- buildAndDeployAndroid
|
- buildAndDeployAndroid
|
||||||
- deployWebsite
|
|
||||||
- buildAndDeployElectron
|
- buildAndDeployElectron
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
|
@ -15,4 +14,3 @@ variables:
|
||||||
include:
|
include:
|
||||||
- local: 'receivers/android/.gitlab-ci.yml'
|
- local: 'receivers/android/.gitlab-ci.yml'
|
||||||
- local: 'receivers/electron/.gitlab-ci.yml'
|
- local: 'receivers/electron/.gitlab-ci.yml'
|
||||||
- local: 'website/.gitlab-ci.yml'
|
|
|
@ -1,7 +0,0 @@
|
||||||
deployWebsite:
|
|
||||||
stage: deployWebsite
|
|
||||||
before_script:
|
|
||||||
- cd website
|
|
||||||
script:
|
|
||||||
- sh deploy.sh
|
|
||||||
when: manual
|
|
|
@ -1,29 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
DOCUMENT_ROOT=/var/www/fcast
|
|
||||||
|
|
||||||
# Take site offline
|
|
||||||
echo "Taking site offline..."
|
|
||||||
touch $DOCUMENT_ROOT/maintenance.file
|
|
||||||
|
|
||||||
# Swap over the content
|
|
||||||
echo "Deploying content..."
|
|
||||||
cp index.html $DOCUMENT_ROOT/
|
|
||||||
cp privacy-policy.html $DOCUMENT_ROOT/
|
|
||||||
cp favicon.png $DOCUMENT_ROOT/
|
|
||||||
cp -r css $DOCUMENT_ROOT/
|
|
||||||
cp -r images $DOCUMENT_ROOT/
|
|
||||||
cp -r js $DOCUMENT_ROOT/
|
|
||||||
cp -r vendor $DOCUMENT_ROOT/
|
|
||||||
|
|
||||||
# Notify Cloudflare to wipe the CDN cache
|
|
||||||
echo "Purging Cloudflare cache..."
|
|
||||||
curl -X POST "https://api.cloudflare.com/client/v4/zones/018ad3b2bbb3bca14f2dd793ddb78de1/purge_cache" \
|
|
||||||
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
--data '{"purge_everything":true}'
|
|
||||||
|
|
||||||
sleep 30
|
|
||||||
|
|
||||||
# Take site back online
|
|
||||||
echo "Bringing site back online..."
|
|
||||||
rm $DOCUMENT_ROOT/maintenance.file
|
|
Loading…
Add table
Add a link
Reference in a new issue