Skip to content

Commit 4e353ed

Browse files
committed
doc: Update README removing reference to obsolete post-receive web hook handler
This commit both removes reference to the `github-circleci-trigger` project and improve the content.
1 parent 20db30f commit 4e353ed

File tree

1 file changed

+34
-17
lines changed

1 file changed

+34
-17
lines changed

README.md

Lines changed: 34 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,60 @@
22

33
This project hosts the Slicer API documentation served from http://apidocs.slicer.org.
44

5+
## Automatic Generation and Publishing
56

6-
## Automatic generation
7+
The Slicer API documentation is automatically generated and published using a GitHub workflow. The
8+
generated files are pushed to the `gh-pages` branch, which is configured as the source for
9+
[GitHub Pages](https://help.github.com/articles/configuring-a-publishing-source-for-github-pages/).
710

8-
Documentation is automatically generated and pushed to the `gh-pages` branch configured as a [GitHub Pages](https://help.github.com/articles/configuring-a-publishing-source-for-github-pages/) source.
11+
### Workflow Triggers
912

10-
The [slicer-apidocs-builder](https://github.com/Slicer/slicer-apidocs-builder) tool is used within the GitHub workflow
11-
[doxygen-build-and-publish.yml](.github/workflows/.github/workflows/doxygen-build-and-publish.yml) to checkout Slicer source code, build doxygen documentation and publish generated html pages.
13+
The [trigger-doxygen-build-and-publish.yml](https://github.com/Slicer/Slicer/blob/main/.github/workflows/trigger-doxygen-build-and-publish.yml) workflow in the `Slicer/Slicer` repository initiates the process whenever:
14+
- The `main` branch is updated.
15+
- A new release tag is pushed.
1216

13-
Each time the `main` branch of https://github.com/Slicer/Slicer is updated or each time a new release tag
14-
is pushed, the generated documentation is either added to the `main` folder or added to a new folder
15-
named after the release tag. Then the updated content is pushed to the `gh-pages` branch.
17+
### Documentation Generation
1618

17-
The simple GitHub post-receive web hook handler triggering a CircleCI build is
18-
[github-circleci-trigger](https://github.com/Slicer/github-circleci-trigger). It is implemented as
19-
a Flask application hosted on a free heroku instance.
19+
The [slicer-apidocs-builder](https://github.com/Slicer/slicer-apidocs-builder) tool handles the
20+
generation and publication of documentation. It is invoked within the [doxygen-build-and-publish.yml](.github/workflows/doxygen-build-and-publish.yml) workflow maintained in this repository to:
2021

21-
## Squash of `gh-pages` branch using a scheduled GitHub Actions worklfow
22+
1. Check out the Slicer source code.
23+
2. Build the Doxygen documentation.
24+
3. Publish the generated HTML files.
2225

23-
After some time, the amount of data published on the `gh-pages` exceeds GitHub [recommended size of 1GB][max_size].
24-
To cleanup the repository, a [scheduled workflow][schedule] associated with this project
25-
will be triggered weekly and will execute [gh-pages-squash.sh](./gh-pages-squash.sh) script.
26+
### Documentation Updates
2627

27-
The script simply do a soft reset, amend the first commit and force push the branch `gh-pages`.
28+
- **Main Branch Updates**: Documentation for the `main` branch is added to the `main` folder.
29+
- **Release Tags**: Documentation for new release tags is added to a folder named after the tag.
30+
31+
The updated content is pushed to the `gh-pages` branch, ensuring the documentation remains current and accessible.
32+
33+
## Managing the `gh-pages` Branch Size
34+
35+
Over time, the size of the `gh-pages` branch may exceed GitHub's [recommended limit of 1GB][max_size].
36+
To manage this, a [scheduled workflow][schedule] is configured to run weekly. This workflow executes
37+
the [gh-pages-squash.sh](./gh-pages-squash.sh) script, which performs the following actions:
38+
1. Executes a soft reset.
39+
2. Amends the first commit.
40+
3. Force-pushes the `gh-pages` branch.
41+
42+
This ensures that the repository size remains within the recommended limits.
2843

2944
[max_size]: https://help.github.com/articles/what-is-my-disk-quota/
3045
[schedule]: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
3146

47+
## Programmatic Updates of the `gh-pages` Branch
3248

33-
## Programmatically request updates of `gh-pages` branch using GitHub API
49+
You can manually trigger updates to the `gh-pages` branch using the GitHub API. This is
50+
useful for debugging or forcing a squash without waiting for the scheduled workflow.
3451

3552
### Prequisites
3653

3754
* Generate GitHub token - See [here](https://github.com/settings/tokens)
3855

3956
### Squash *gh-pages*
4057

41-
*This is useful to debug the workflow without having to wait.*
58+
To trigger the squash workflow programmatically, run the following command:
4259

4360
```
4461
GITHUB_TOKEN=<YOUR_GITHUB_TOKEN> ./trigger-workflow-squash.sh

0 commit comments

Comments
 (0)