IETF community member Martin Thomson created a public template in GitHub that many IETFers use to start their GitHub repos for their Internet-Drafts.
If you have not already done so, set up GitHub Pages.
To create a new repo using this template:
When the repo is created from the template, it is not empty. It contains two branches, some stub files, which will need review and some editing, and some GitHub actions, which are scripts that can publish output and check for errors.
See also the list of features.
The new repo has two branches:
GitHub Actions provide automated continuous integration that can:
These actions can be found on the Actions tab, and their code (i.e., the YAML files) can be found in the directory .github/workflows on the main branch.
When you click the Actions tab, you will see that three actions (Perform Initial Repository Setup, Update Editor's Copy and pages-build-deployment) have been performed.
In the repo that you have created:
The template documentation notes that:
It is not possible to update workflows (the files GitHub Actions use) from an action unless you use custom personal access tokens. Rather than complicate the setup process by requiring a token, this template includes all the necessary workflow files from the beginning, plus a special setup workflow. Before the repository is properly setup, the other workflows will fail immediately (and safely). The setup workflow removes itself once it is successful.
If Perform Initial Repository Setup fails, it is most likely due to trailing whitespace that was added to the I-D markdown file. Remove any trailing whitespace and commit your changes.
Once you have successfully set up the repo, the contents of the main branch will be updated with the following files:
make.The makefile (and supporting files) lets you perform the actions listed above and more from the command line (see Installation and Setup for other things you need to do to get command line tools to work):
make - runs xml2rfc to create HTML and text files from markdown files (either kramdown or mmark). make diff - creates an rfcdiff between your current text file and the last file that you submitted to datatracker.make gh-pages - Update the gh-pages branch with the latest edits. GitHub pages make your changes available on the web. There is also a GitHub Action to do this. make upload - Upload tagged changes to the IETF datatracker using the API. To tag, use a new version of an I-D draftstring, e.g., git tag -a draft-ietf-unicorn-protocol-02make lint - Check for common formatting errors like trailing whitespacemake fix-lint - Fix found issuesmake idnits - Checks for nits using idnitsmake issues - Download a copy of GitHub issues and pull requests.make update - updates the repo code and any dependencies. See instructions for keeping these files up to date.make update - for dealing with surprising errors.The make features are documented at What This Project Can Do.
Note that, while running these commands from the command line is optional, there are some tools available at the CLI that are not available with GitHub Actions. It may also be easier to extend tooling on the CLI. See the guidance on extending your local toolset.
Right now, there's just a barebones kramdown-rfc file. Updating the fields that need attention is a good way to test the repo.
After updating the YAML header and merging the PR successfully into main, the following updates are made to the gh-pages branch:
The fields in the venue block in the md file:
venue: group: flowers type: Working Group mail: flowers@example.com arch: "https://mailarchive.ietf.org/arch/browse/flowers" github: "ajeanmahoney/zinnia" latest: "https://ajeanmahoney.github.io/zinnia/draft-mahoney-zinnia.html"
Are used to create the following output, which can be seen in the gh-pages branch:
About This Document This note is to be removed before publishing as an RFC. The latest revision of this draft can be found at https://ajeanmahoney.github.io/zinnia/draft-mahoney-zinnia.html. Status information for this document may be found at https://datatracker.ietf.org/doc/draft-mahoney-zinnia/. Discussion of this document takes place on the flowers Working Group mailing list (mailto:flowers@example.com), which is archived at https://mailarchive.ietf.org/arch/browse/flowers. Source for this draft and an issue tracker can be found at https://github.com/ajeanmahoney/zinnia.
In order to make the output available, the repo must either be public or you must have a paid subscription to GitHub.
(The following is not documented in Thomson's docs because it's set up automatically if you create a public repo, but is documented here)
If you have changed a private repo to public and would like to have the output publicly available, then under Settings:
The next step is to get a real I-D into the repo.
For kramdown- rfc, the following YAML fields are required:
docname: Needs to be of the form, filename-latest (e.g., draft-mahoney-zinnia-latest) with no file extension nor version number. If filename of filename-latest does not match filename.md, then checks will fail. For RFCXML