File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11VITE_VERSION_LATEST = " v11.0.0"
2- VITE_VERSION_NEXT = " v12.0.0"
2+ VITE_VERSION_NEXT = " v12.0.0"
3+ VITE_DEPLOYMENT_URL = " https://foo.bar.com"
Original file line number Diff line number Diff 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 PUBLIC_DEPLOYMENT_URL
34+ - name : Set VITE_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 "PUBLIC_DEPLOYMENT_URL =" >> "$GITHUB_ENV"
40+ echo "VITE_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 "PUBLIC_DEPLOYMENT_URL =https://${SAFE_BRANCH}.rescript-lang.pages.dev" >> "$GITHUB_ENV"
47+ echo "VITE_DEPLOYMENT_URL =https://${SAFE_BRANCH}.rescript-lang.pages.dev" >> "$GITHUB_ENV"
4848 fi
4949 - name : Build
5050 run : yarn build
5151 env :
52- PUBLIC_DEPLOYMENT_URL : ${{ env.PUBLIC_DEPLOYMENT_URL }}
52+ VITE_DEPLOYMENT_URL : ${{ env.VITE_DEPLOYMENT_URL }}
5353 - name : Deploy
5454 id : deploy
5555 uses : cloudflare/wrangler-action@v3
Original file line number Diff line number Diff line change 22external dev : bool = "import.meta.env.DEV"
33
44// Cloudflare deployment URL
5- external deployment_url : option <string > = "import.meta.env.PUBLIC_DEPLOYMENT_URL "
5+ external deployment_url : option <string > = "import.meta.env.VITE_DEPLOYMENT_URL "
66
77// the root url of the site, e.g. "https://rescript-lang.org/" or "http://localhost:5173/"
88let root_url = switch deployment_url {
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ module Url = {
6262
6363 let makeOpenGraphImageUrl = (title , description ) => {
6464 let baseUrl = Env .deployment_url -> Option .getOr (Env .root_url )
65+ Console .log (baseUrl )
6566 ` ${baseUrl}${baseUrl-> Stdlib.String.endsWith("/" )
6667 ? ""
6768 : "/" }ogimage.png?title=${title}&description=${description}`
You can’t perform that action at this time.
0 commit comments