|
1 | | -# run locally |
| 1 | +# Pycom documentation |
| 2 | + |
| 3 | +Welcome to Pycom docs. |
| 4 | + |
| 5 | +## Run locally |
2 | 6 |
|
3 | 7 | ``` |
4 | 8 | brew install hugo |
5 | 9 | hugo serve |
6 | 10 | ``` |
7 | 11 |
|
8 | | -# Workflow |
| 12 | +## Github workflow |
9 | 13 |
|
10 | | -## Make documentation update |
11 | | -- Checkout your branch from `master` and commit and push your changes |
12 | | -- Make a PR against `master` branch (implicitly set as `master` branch is our default branch) |
13 | | -- Assign a reviewer and let your PR to be merged |
| 14 | +The default branch is `publish`. Changes pushed into this branch, will update [docs.pycom.io](https://docs.pycom.io/). |
14 | 15 |
|
15 | | -## Deploy changes |
16 | | -- Make PR from `master` against `publish` branch |
17 | | -- Assign a reviewer and let your PR to be merged |
18 | | -- docs were updated |
| 16 | +Second "live" branch is `development-publish` Changes pushed into this branch, will update [development.pycom.io](https://development.pycom.io) |
19 | 17 |
|
20 | | -# some infos: |
| 18 | +Both `publish` and `development-publish` branches are protected. Changes cannot be pushed into them directly. |
| 19 | +They require approved PR. |
21 | 20 |
|
22 | | -- assets are in ./static directory, a directory aliased at / |
23 | | -- css in /themes/doc-theme/static/doc-theme.css |
24 | | -- SUMMARY.md is in config.toml |
| 21 | +A webhook has been installed on the publish branch to |
| 22 | +https://publish.d20i0wkqbblkur.amplifyapp.com/ |
| 23 | +https://github.com/pycom/pycom-documentation/tree/master |
| 24 | + |
| 25 | +### Updating documentation pages (no development firmware API changes) |
| 26 | +Use this workflow if you want to update documentation pages |
| 27 | +(you are not updating pages with new development firmware API). |
| 28 | + |
| 29 | + $ git checkout publish |
| 30 | + $ git pull |
| 31 | + $ git checkout -b my-docs-update |
| 32 | + |
| 33 | +After you push your changes to your branch, go to GitHub and create two pull requests. |
| 34 | +So your branch is merged both to `publish` and `development-publish` branch. |
| 35 | + |
| 36 | +After a moment both https://docs.pycom.io and https://development.pycom.io will be updated. |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | +### Adding development firmware API changes |
| 41 | +This workflow will be probably done by someone from Pycom firmware development team. |
| 42 | +In this case, Pycom development docs https://development.pycom.io/ needs to be updated with API changes from development firmware. |
| 43 | + |
| 44 | +Note: we are running https://docs.pycom.io and https://development.pycom.io |
| 45 | +When a user clicks on development dropdown on any firmware API change, he/she will be redirected to https://development.pycom.io |
| 46 | + |
| 47 | + $ git checkout development-publish |
| 48 | + $ git pull |
| 49 | + $ git checkout -b my-fw-api-update |
| 50 | + |
| 51 | +After you push your changes to your branch, |
| 52 | +go to GitHub and create a pull with **development-publish** branch as a base branch. |
25 | 53 |
|
| 54 | + |
26 | 55 |
|
27 | | -# help |
| 56 | +### Adding changes from "publish" branch to "development-publish" branch |
| 57 | +In this case, you want to sync "development" version of docs with the "stable" docs. |
28 | 58 |
|
29 | | -- gohugo.io |
| 59 | + $ git checkout development-publish |
| 60 | + $ git pull |
| 61 | + $ git checkout publish |
| 62 | + $ git pull |
| 63 | + $ git checkout -b my-sync-branch |
| 64 | + $ git merge development-publish |
| 65 | + |
| 66 | +After you push your changes to your branch, |
| 67 | +go to GitHub and create a pull with **development-publish** branch as a base branch. |
30 | 68 |
|
| 69 | + |
31 | 70 |
|
32 | | -# detect broken links |
| 71 | +### Adding changes from "development-publish" to "publish" (when development FW API becomes stable FW API) |
| 72 | +In this case, you want to add changes from development firmware API to stable docs. |
| 73 | + |
| 74 | + $ git checkout publish |
| 75 | + $ git pull |
| 76 | + $ git checkout development-publish |
| 77 | + $ git pull |
| 78 | + $ git checkout -b my-sync-branch |
| 79 | + $ git merge development-publish |
| 80 | + |
| 81 | +After you push your changes to your branch, |
| 82 | +go to GitHub and create a pull with **publish** branch as a base branch. |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | +## some info: |
| 87 | + |
| 88 | +- assets are in ./static directory, a directory aliased at / |
| 89 | +- css in /themes/doc-theme/static/doc-theme.css |
| 90 | +- SUMMARY.md is in config.toml |
| 91 | +- [gohugo.io](gohugo.io) |
| 92 | + |
| 93 | +## detect broken links |
33 | 94 |
|
34 | 95 | ``` |
35 | 96 | wget -o 404.txt -r --spider http://localhost:1313 |
36 | 97 | ``` |
37 | | - |
38 | | -A webhook has been installed on the publish branch to |
39 | | -https://publish.d20i0wkqbblkur.amplifyapp.com/ |
40 | | -https://github.com/pycom/pycom-documentation/tree/master |
|
0 commit comments