Quickstart
Install ghenv
Use Linux or macOS on x86_64 or arm64. Install the GitHub CLI and sign in to GitHub.com. Use an account with Actions dispatch and artifact access to the repository.
gh auth login
ghenv --versionThe installer places the verified executable in ~/.local/bin. Add that directory to your shell’s PATH.
Prepare GitHub Preview
Create a Preview environment in your repository. Follow the published workflow example on main and pin the exporter to a reviewed commit. Your repository owner must set GHENV_PREVIEW_BUNDLE to the approved development values.
See the bundle format for an example. Environment reviewers and branch restrictions still apply.
Run the application
Replace OWNER/REPO with the GitHub repository’s exact spelling and select the names your app expects. Put the application command after --.
ghenv run --repo OWNER/REPO --workflow pr-preview.yml \
--secrets API_KEY --vars API_BASE_URL -- npm run devThe workflow runs once for that launch. The app uses the selected variables from its environment.