Some jobs need to be done frequently, and involve a detailed procedure that hasn't been automated for whatever reason. This page contains step-by-step instructions to do those jobs.
Create a new maintenance issue and follow the steps described in the template.
When you have a merge failure in the built
branch, see if you can fix it with a guard line. If so, use the following procedure:
- create a PR in the
main
branch that adds a guard line but does not include the conflicting PR - merge the guard line into the
built
branch - rebase the conflicting PR on top of the new
main
branch - accept the (no longer conflicting) PR
If you can resolve a merge conflict with the procedure above, there's no need to schedule a planned maintenance. Otherwise:
- create a new PR that merges the existing PR into the
built
branch - test both thoroughly in a personal repo
- once everything works, create a new planned maintenance issue with steps like:
- merge the
built
PR into main first - then merge the conflicting PR
- check the normal workflow merges back correctly
- it will fail if you merged the
built
PR after the original PR
- it will fail if you merged the
- merge the
To keep the build system as standard as possible, all dependencies need to be cached in the build image. That means that when you update the dependencies of a package, you need to update the build system as well. This can cause hard-to-test problems, because commands occasionally succeed on the dev-server but fail in production due to some quirk of GitHub Actions configuration. To minimise that risk, use the following procedure:
- run
update-dependencies.sh commit
in the development environment:- example command:
docker exec -it -w /app/internal-tools sleepdiary-dev-server ./bin/update-dependencies.sh commit
- this script is still quite young - read through it and look for issues
- this will run the upgrade script and commit the results to a new branch
- this will create several pull requests that will be used in later steps
- example command:
- run
update-dependencies.sh push
in the host environment:- example command:
./bin/update-dependencies.sh push
- example command:
- follow the instructions displayed by the program
- merge the pull request for
internal-tools
(guaranteed to run last in the script above) - wait for the relevant action to build
pre-release
versions of the build system and dev-server - check the new dev-server works as expected
- run
check-dev-server.sh pre-release
once to check everything
- run
- push a test-commit for every repository that uses the build system
- run
check-prerelease-build-system.sh
once in each repository that was updated
- run
- create an
internal-tools
PR to pull into latest from main with message "Recent changes" - Run a planned maintenance to accept all the PRs generated above
- see previous planned maintenances
- add the PRs above to the maintenace actions
Some files in the "docs" repo are generated automatically using files from the "resources" repo. This could be triggered automatically using a special GitHub Actions script, but GitHub's relatively coarse permissions system means it would require careful design. Until then, we put up with triggering events manually:
- Go to the "Generate from resources" action
- click "Run workflow" (to the right "This workflow has a workflow_dispatch event trigger")
- click the green "Run workflow" button
- wait for the workflow to complete
- go to the list of pull requests
- review and accept the PR created by the workflow
- make a personal repository that will be the basis for the new repository
- create a minimum viable product
- push any commits
- add repository metadata
- configure GitHub Pages
- check everything looks right
- remove any branches that shouldn't go in the main repository
- make sure all the branch histories look nice (e.g. remove "fixup" and "WIP" commits)
- transfer the repository to sleepdiary
- fork a new personal repo from the moved repository
- edit your
.gitconfig