Secrets
Draft deposits on Zenodo and live previews of pull requests on Cloudflare need tokens that identify the journal to each service.[1] A paper repository keeps its tokens as secrets on GitHub environments. Each environment is open only to the branch or tag whose workflow reads its secrets. GitHub needs no secret of its own: workflows use the token GitHub gives each run, and oak run locally acts as the account logged in to gh (see Create a journal).
ZENODO_TOKEN,ZENODO_TOKEN_SANDBOX- Used by the workflows to reserve a DOI and to fill each version’s draft.
ZENODO_TOKENworks on Zenodo,ZENODO_TOKEN_SANDBOXon the Zenodo sandbox, for tests. Both are optional, and we recommend leaving them unset (why). Create each under Applications in the account settings on Zenodo or the sandbox. Held by thezenodo-prepare(formain) andzenodo-publish(forv*tags) environments. Set with--zenodo-tokenand--zenodo-token-sandbox. CLOUDFLARE_API_TOKEN,CLOUDFLARE_ACCOUNT_ID- Used to give each pull request a live preview link, once the journal also turns previews on. Until then, a pull request gets a downloadable copy of the built site. The token needs permission to edit Cloudflare Pages. Held by the
previewenvironment (formain). Set with--cf-tokenand--cf-account.
oak bootstrap paper sets each secret it is given on the environments that hold it. Pass each as its flag, or set an environment variable with the secret’s name before running it. When it finishes, oak lists the secrets still missing and links to the repository’s environment settings, where you can set them.