Skip to content

Commit f8bc6c2

Browse files
committed
Update GitHub Actions: Set PUBLIC_URL dynamically for branch-based deployment
1 parent bb2e0cf commit f8bc6c2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/build-deploy-zodiac.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ jobs:
1919
- name: Install dependencies
2020
run: yarn install --frozen-lockfile
2121

22-
- name: Build React App with Dynamic PUBLIC_URL
23-
run: |
24-
echo "Building for /dev/dev-fan/"
25-
PUBLIC_URL="/dev/dev-fan/" yarn build
26-
2722
- name: Determine Branch Name
2823
id: get_branch
2924
run: echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
3025

26+
- name: Build React App with Dynamic PUBLIC_URL
27+
run: |
28+
echo "Building for /dev/${{ env.BRANCH_NAME }}/"
29+
PUBLIC_URL="/dev/${{ env.BRANCH_NAME }}/" yarn build
30+
3131
- name: Copy package to server
3232
uses: NeuroJSON/[email protected]
3333
with:

0 commit comments

Comments
 (0)