Skip to content

Commit bcea9c1

Browse files
committed
fix env variable name
1 parent ff2fd1f commit bcea9c1

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,25 @@ jobs:
3131
run: yarn install
3232
- name: Sync playground bundles
3333
run: yarn build:sync-bundles
34-
- name: Set DEPLOY_URL
34+
- name: Set PUBLIC_DEPLOYMENT_URL
3535
shell: bash
3636
run: |
3737
RAW_BRANCH="${{ github.head_ref || github.ref_name }}"
3838
3939
if [[ "$RAW_BRANCH" == "master" ]]; then
40-
echo "DEPLOY_URL=" >> "$GITHUB_ENV"
40+
echo "PUBLIC_DEPLOYMENT_URL=" >> "$GITHUB_ENV"
4141
else
4242
SAFE_BRANCH="${RAW_BRANCH//\//-}"
4343
4444
SAFE_BRANCH=$(echo "$SAFE_BRANCH" | tr '[:upper:]' '[:lower:]')
4545
4646
echo "SAFE_BRANCH=$SAFE_BRANCH" >> "$GITHUB_ENV"
47-
echo "DEPLOY_URL=https://${SAFE_BRANCH}.rescript-lang.pages.dev" >> "$GITHUB_ENV"
47+
echo "PUBLIC_DEPLOYMENT_URL=https://${SAFE_BRANCH}.rescript-lang.pages.dev" >> "$GITHUB_ENV"
4848
fi
4949
- name: Build
5050
run: yarn build
5151
env:
52-
DEPLOY_URL: ${{ env.DEPLOY_URL }}
52+
PUBLIC_DEPLOYMENT_URL: ${{ env.PUBLIC_DEPLOYMENT_URL }}
5353
- name: Deploy
5454
id: deploy
5555
uses: cloudflare/wrangler-action@v3

src/bindings/Env.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external dev: bool = "import.meta.env.DEV"
33

44
// Cloudflare deployment URL
5-
external deployment_url: option<string> = "import.meta.env.DEPLOYMENT_URL"
5+
external deployment_url: option<string> = "import.meta.env.PUBLIC_DEPLOYMENT_URL"
66

77
// the root url of the site, e.g. "https://rescript-lang.org/" or "http://localhost:5173/"
88
let root_url = switch deployment_url {

0 commit comments

Comments
 (0)