This shows you the differences between two versions of the page.
| — |
internet-draft-template-repo-instructions [2025/10/29 09:43] (current) jmahoney created |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Using GitHub: Martin Thomson' | ||
| + | IETF community member [[https:// | ||
| + | |||
| + | ===== Prerequisites ===== | ||
| + | |||
| + | If you have not already done so, set up [[https:// | ||
| + | |||
| + | ===== Startup ===== | ||
| + | |||
| + | To create a new repo using this template: | ||
| + | * Go to [[https:// | ||
| + | * Click the green **Use this template** button and select **Create a new repository**. The **Create a new repository** page appears. | ||
| + | * Check the **Include all branches** box. | ||
| + | * Provide a name for the repo. | ||
| + | * Select whether the repo should be public or private. Not all features of the template are available to a private repository, though, and some workflows may not work. | ||
| + | * Click the green **Create repository** button. Your new repo appears. | ||
| + | |||
| + | |||
| + | ===== Initial repo contents ===== | ||
| + | |||
| + | 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 [[https:// | ||
| + | |||
| + | ====Branches, | ||
| + | |||
| + | The new repo has two branches: | ||
| + | * **main** - editing work is expected to take place on this branch and PRs should be branched off this. Initial contents: | ||
| + | * .github/ | ||
| + | * LICENSE.md | ||
| + | * archive.yml | ||
| + | * ghpages.yml | ||
| + | * publish.yml | ||
| + | * setup.yml | ||
| + | * update.yml | ||
| + | * draft-todo-yourname-protocol.md - a barebones I-D in kramdown-rfc. | ||
| + | * README.md | ||
| + | * **gh-pages** - a branch that will contain document output, but initially just has: | ||
| + | * .gitignore | ||
| + | * archive.json - an empty file | ||
| + | * draft-todo-yourname-protocol.html - an HTML file of the barebones I-D | ||
| + | * draft-todo-yourname-protocol.txt - a text file of the barebones I-D | ||
| + | * index.html - an HTML page for your repo that provides links to your I-D's datatracker page and the latest diff file. | ||
| + | |||
| + | |||
| + | ==== GitHub actions ==== | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | * **Archive Issues and Pull Requests** (archive.yml): | ||
| + | * **Perform Initial Repository Setup** (setup.yml): | ||
| + | * **Publish New Draft Version** (publish.yml): | ||
| + | * **Update Editor' | ||
| + | * **Update Generated Files** (update.yml): | ||
| + | |||
| + | These actions can be found on the Actions tab, and their code (i.e., the YAML files) can be found in the directory .github/ | ||
| + | |||
| + | When you click the Actions tab, you will see that three actions (**Perform Initial Repository Setup**, **Update Editor' | ||
| + | |||
| + | ===== Finishing setup ===== | ||
| + | |||
| + | In the repo that you have created: | ||
| + | * Rename draft-todo-yourname-protocol.md by following the link in the README. | ||
| + | * Follow the instructions in the comments of the file: | ||
| + | * Add a title to your draft. | ||
| + | * Commit your changes. | ||
| + | * You will receive a 404 message because the repo is not fully set up. | ||
| + | * Click the green **Return to repository overview** button. | ||
| + | * Click the Actions tab. You should see that **Update Editor' | ||
| + | * **Update Editor' | ||
| + | * **Perform Initial Repository Setup** succeeded. Note that the action is no longer listed on the left-hand side: it deletes itself upon success. | ||
| + | |||
| + | The [[https:// | ||
| + | > 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. | ||
| + | |||
| + | ==== Troubleshooting ==== | ||
| + | |||
| + | If **Perform Initial Repository Setup** fails, it is most likely due to [[https:// | ||
| + | |||
| + | ==== Updated repo contents ==== | ||
| + | |||
| + | Once you have successfully set up the repo, the contents of the **main** branch will be updated with the following files: | ||
| + | * .editorconfig - see [[https:// | ||
| + | * .gitignore - a file containing a [[https:// | ||
| + | * CONTRIBUTING.md - a file that provides a very high-level IETF Note Well | ||
| + | * LICENSE.md - a file that points to the CONTRIBUTING.md file | ||
| + | * Makefile - see details below | ||
| + | * filename.md - the setup modifies the following YAML fields after your edit: | ||
| + | * setup deletes the comments that contained the instructions for editing the file. | ||
| + | * If you did not provide any area or WG info, the fields in the YAML header will be commented out (with #, but the file viewer in GitHub will interpret these as headings, which will direct your attention to them). | ||
| + | * docname: updated to use the name you gave the file. | ||
| + | * email: updated to use the email you have on file with GitHub. | ||
| + | * github: updated to use your repo info. | ||
| + | * latest: now contains a URL to your repo's github.io page that will display I-D output once it is created. | ||
| + | * README.md - the instructions on setting up the repo have been replaced with a discussion of the I-D with links to the output (the datatracker and diff links won't work yet), the CONTRIBUTING file, and brief introduction to '' | ||
| + | |||
| + | === makefile === | ||
| + | |||
| + | The makefile (and supporting files) lets you perform the actions listed above and more from the command line (see [[https:// | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * makefile options for checking documents: | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * For offline access. There is also a GitHub Action that does this. | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | The make features are documented at [[https:// | ||
| + | |||
| + | 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 [[https:// | ||
| + | |||
| + | ===== Updating the YAML header ===== | ||
| + | |||
| + | Right now, there' | ||
| + | |||
| + | After updating the YAML header and merging the PR successfully into main, the following updates are made to the gh-pages branch: | ||
| + | * a directory named after the PR branch has been added. It contains the text and HTML outputs of the file. | ||
| + | * index.html - a new file that points the text and HTML outputs. | ||
| + | * filename.txt - HTML output | ||
| + | * filename.html - HTML output | ||
| + | |||
| + | ==== "About This Document" | ||
| + | |||
| + | The [[https:// | ||
| + | < | ||
| + | venue: | ||
| + | group: flowers | ||
| + | type: Working Group | ||
| + | mail: flowers@example.com | ||
| + | arch: " | ||
| + | github: " | ||
| + | latest: " | ||
| + | </ | ||
| + | |||
| + | 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 | ||
| + | | ||
| + | | ||
| + | | ||
| + | |||
| + | | ||
| + | | ||
| + | | ||
| + | |||
| + | | ||
| + | | ||
| + | </ | ||
| + | |||
| + | ===== Getting publishing to work ===== | ||
| + | |||
| + | 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' | ||
| + | |||
| + | If you have changed a private repo to public and would like to have the output publicly available, then under **Settings**: | ||
| + | |||
| + | * Select **Pages** under **Code and Automation** on the left-hand side. | ||
| + | * Under the **Build and deployment** section: | ||
| + | * Ensure **Deploy from branch** is selected. | ||
| + | * Select **gh-pages** and **/(root)** from the drop-downs. | ||
| + | * Click **Save**. This adds the **pages-build-deployment** action to the Actions tab. | ||
| + | * You should now be able to access the output at username.github.io/ | ||
| + | |||
| + | |||
| + | ===== Adding the real doc ===== | ||
| + | |||
| + | The next step is to get a real I-D into the repo. | ||
| + | |||
| + | For kramdown- rfc, the following YAML fields are required: | ||
| + | * by the repo: | ||
| + | * '' | ||
| + | * by kramdown-rfc: | ||
| + | * (not all are necessarily required) [[https:// | ||
| + | |||
| + | For RFCXML | ||
| + | * docName in the <rfc> element needs to be of the form, // | ||