mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-06 05:26:54 +08:00
fix: sh scripts sometimes not finding .env file
!nuf
This commit is contained in:
parent
316bbd33a6
commit
d57e318cf1
2 changed files with 13 additions and 2 deletions
|
@ -1,6 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
source .env
|
||||
# Determine the directory of the script
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
# Source the .env file from the parent directory of the script's directory
|
||||
source "$SCRIPT_DIR/../.env"
|
||||
|
||||
echo "Deploying backend to $BE_HOST with script $BE_SCRIPT_PATH"
|
||||
|
||||
# Connect to SSH and execute remote script
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
#!/bin/bash
|
||||
source .env
|
||||
|
||||
# Determine the directory of the script
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
# Source the .env file from the parent directory of the script's directory
|
||||
source "$SCRIPT_DIR/../.env"
|
||||
|
||||
echo "Purging Cloudflare cache for zone $CF_ZONE_ID"
|
||||
response=$(curl -s -X POST "https://api.cloudflare.com/client/v4/zones/$CF_ZONE_ID/purge_cache" \
|
||||
-H "Authorization: Bearer $CF_API_KEY" \
|
||||
|
|
Loading…
Add table
Reference in a new issue