Branches and deployment¶
| Branch | How changes arrive | What CI publishes |
|---|---|---|
dev/<name> |
Create from develop, for example dev/auth_module. Open a PR into develop. |
PR checks only |
develop |
Merge a reviewed feature PR after the checks pass. | Usage and Developer guides to GitHub Pages |
main |
After manual review of develop, merge a PR from develop using a merge commit. The initial scaffold is the one direct-commit exception. |
Wheel and source distribution to PyPI |
Keep main as the repository default. Before each promotion, bump the package version and refresh uv.lock in a PR to develop, for example with uv version 0.1.1 followed by uv lock. CI requires the version in the release PR to be greater than the version on main. PyPI filenames cannot be reused.
One-time GitHub and PyPI setup¶
- With explicit approval for the first scaffold commit, bootstrap
mainand createdevelopfrom it. Apply branch rules tomainanddevelopafter bootstrapping. Require PRs, manual approval, and the CIdocsandpackagematrix checks. Disallow direct pushes and broad bypass access. - In GitHub Settings → Pages, select GitHub Actions as the source. Restrict the
github-pagesenvironment to deployments fromdevelop. The workflow uploadssite/public/, which contains both guides built withmkdocs.public.yml. - In Settings → Environments, create
nomad-testand allow deployments fromdevelopandmainonly.- Under Environment variables, set
NOMAD_TEST_API_URLto the plain HTTPS API base URL for the deployment to test, without quotes or Markdown link formatting. For the NOMAD test deployment, usehttps://nomad-lab.eu/prod/v1/test/api/v1. GitHub environment variables - Under Environment secrets, set
NOMAD_TEST_PATto a PAT issued by the deployment configured inNOMAD_TEST_API_URL. Give it onlyusers:read. If the deployment changes, update both values together. Replace the secret when the PAT expires or is revoked. Create a NOMAD PAT
- Under Environment variables, set
- Create the GitHub environment
pypiand restrict it tomain. Configure PyPI Trusted Publishing for ownerFAIRmat-NFDI, repositorynomad-python-api, workflowci.yml, and environmentpypi. Use a pending publisher if the PyPI project is new. Set this up before the first push tomainthat should publish. If a release run fails because setup is incomplete, finish the setup and rerun the failed job for that commit.
PRs run the mocked offline tests and docs checks without access to the live-test secret. Pushes to develop and main run those checks and the Live NOMAD test job before publishing. The live job requires both NOMAD_TEST_API_URL and NOMAD_TEST_PAT. Once this workflow is on the default branch, you can rerun both test layers without publishing from Actions → CI → Run workflow by selecting develop or main. Publishing uses GitHub OIDC and needs no stored PyPI token.