fix(build): choose backend data host depending on branch

This commit is contained in:
MiniDigger | Martin 2022-12-23 16:03:42 +01:00
parent 798c1990bc
commit 1dc2b68e2a

View File

@ -94,13 +94,20 @@ jobs:
# env:
# CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
- name: Set environment for branch
run: |
if [[ $GITHUB_REF == 'refs/heads/master' ]]; then
echo "BACKEND_DATA_HOST=https://hangar.papermc.io" >> "$GITHUB_ENV"
else
echo "BACKEND_DATA_HOST=https://hangar.papermc.dev" >> "$GITHUB_ENV"
fi
- name: Build frontend
env:
# keep these in sync with compose!
BACKEND_HOST: "http://hangar_backend:8080"
AUTH_HOST: "https://hangar-auth.papermc.dev"
PUBLIC_HOST: "https://hangar.papermc.dev"
BACKEND_DATA_HOST: "https://hangar.papermc.dev"
DEBUG: "hangar:*"
run: (cd frontend && pnpm build)