mirror of
https://github.com/HangarMC/Hangar.git
synced 2024-11-21 01:21:54 +08:00
fix(build): choose backend data host depending on branch
This commit is contained in:
parent
798c1990bc
commit
1dc2b68e2a
9
.github/workflows/deploy.yml
vendored
9
.github/workflows/deploy.yml
vendored
@ -94,13 +94,20 @@ jobs:
|
|||||||
# env:
|
# env:
|
||||||
# CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
# 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
|
- name: Build frontend
|
||||||
env:
|
env:
|
||||||
# keep these in sync with compose!
|
# keep these in sync with compose!
|
||||||
BACKEND_HOST: "http://hangar_backend:8080"
|
BACKEND_HOST: "http://hangar_backend:8080"
|
||||||
AUTH_HOST: "https://hangar-auth.papermc.dev"
|
AUTH_HOST: "https://hangar-auth.papermc.dev"
|
||||||
PUBLIC_HOST: "https://hangar.papermc.dev"
|
PUBLIC_HOST: "https://hangar.papermc.dev"
|
||||||
BACKEND_DATA_HOST: "https://hangar.papermc.dev"
|
|
||||||
DEBUG: "hangar:*"
|
DEBUG: "hangar:*"
|
||||||
run: (cd frontend && pnpm build)
|
run: (cd frontend && pnpm build)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user