Azure / Azure/static-web-apps

Access hostname as environment variable during build

Open
#480 1 comment 1 reaction 0 assignees View on GitHub
enhancement github-action
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**

Some frameworks and static site generators sometimes require the app's domain name during build time.

**Describe the solution you'd like**

Would be great to to make the following 2 variables available in the build:

- hostname (`happy-panda-123456789.azurestaticapps.net` or custom domain, or staging hostname)
- base URL (`https://happy-panda-123456789.azurestaticapps.net` or custom domain, or staging hostname)

**Describe alternatives you've considered**

Hardcode the hostname in the GitHub Actions workflow file. This doesn't work for PRs.

/cc @geektrainer

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.