Skip to content

Commit 7e9015a

Browse files
committed
docs: add docs on releasing
1 parent da23e84 commit 7e9015a

2 files changed

Lines changed: 37 additions & 0 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ If you want to contribute to this repo, make sure to check out the [contributing
2525
This project follows the [all-contributors](https://allcontributors.org/) specification. Contributions of any kind welcome!
2626
If you've contributed to this project and you're not in the contributors list, please open an issue or a PR to fix it.
2727

28+
### Releasing the website
29+
30+
If you're a core contributor and you want to push changes to production, follow the instructions in [docs/releasing.md](./docs/releasing.md)
31+
2832
## Contributors ✨
2933

3034
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

docs/releasing.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# How to create releases
2+
3+
## Updating the questions data
4+
5+
All changes to question data have to be made on Google Sheets: that serves as the source of all data.
6+
The sheet can be accessed [here](https://docs.google.com/spreadsheets/d/110mI5KwlDNswGaTHGJ931A034O5Svj7X657eFspsvfE/edit?usp=sharing):
7+
if you don't have access, reach out to a PoliNetwork admin.
8+
9+
The data on the sheet is regularly pulled by a GitHub Actions workflow on the [PoliNetworkOrg/TheTOLProjectData](https://github.com/PoliNetworkOrg/TheTOLProjectData) repo. If you want to update it manually you can dispatch the update workflow from [here](https://github.com/PoliNetworkOrg/TheTOLProjectData/actions/workflows/update.yml).
10+
The updated data is available for inspection at the `/dbpreview` and `/qpreview` routes of the website.
11+
12+
Once you have verified that the question display correctly, you can push the changes to production by dispatching the [`deploy`](https://github.com/PoliNetworkOrg/TheTOLProjectData/actions/workflows/deploy.yml) workflow.
13+
14+
## Updating the website
15+
16+
You can make all the changes you want on the `main` branch of this repo: they will be automatically deployed on our preview environment.
17+
18+
When you're ready to release the changes, follow these steps:
19+
20+
1. **Bump the version using `npm version`**
21+
You can choose to use `patch`, `minor`, or `major` depending on the changes you're releasing.
22+
23+
2. **Push the commit and the tags to the repo: `git push && git push --tags`**
24+
If you get an error because there are tag conflicts, double check that your local branch is up-to-date; you can overwrite local tags with `git pull --tags -f`.
25+
26+
3. **[Create a new release](https://github.com/PoliNetworkOrg/TheTOLProject/releases/new) on GitHub**
27+
Make sure you choose the tag you've just created as target. If you want to generate notes automatically (recommended) make sure to select the correct previous tag.
28+
Publish the release: this will automatically trigger the production deployment.
29+
30+
4. **Update and deploy the db**
31+
The new website will expect a db with the same version.
32+
You'll first need update the data with the [`update`](https://github.com/PoliNetworkOrg/TheTOLProjectData/actions/workflows/update.yml) workflow. After that's done you'll see that the version in the json file matches the one of the website.
33+
You can now run the [`deploy`](https://github.com/PoliNetworkOrg/TheTOLProjectData/actions/workflows/deploy.yml) workflow to push the changes to production.

0 commit comments

Comments
 (0)