-
Notifications
You must be signed in to change notification settings - Fork 502
Description
It would be very nice if we could automate regenerating the site whenever a release tag is created on the master branch.
Based on the research I have done so far into how the site is set up, that would roughly involve the following steps/conditions:
- Run when a tag has been created on the
masterbranch (release-publishedevent I believe) and the CI for that branch has passed.
Probably a good idea to also allow manual triggering of the workflow to allow rebuilding of the site intermittently. - Install PHP at 7.1 or higher.
- Install ApiGen - I suspect at version 4.x for now.
- Update line 15 of the
apigen.neonfile in thegh-pagesbranch to reflect the name of the just released tag.
The name of the tag should be available inGITHUB_REFor alternatively can be obtained via a call to the GH API or via a call to git.
Refs: - Run ApiGen from the root of the
gh-pagesbranch with theapigen.neonconfig.
This will update the files in thegh-pagesapidirectory. - Install Python
- Run the
buildtool.pyscript from the root of thegh-pagesbranch.
This will update theindex.mdfile and the files in thedocsdirectory of thegh-pagesbranch. - Install Ruby 2.7.x
- Run
bundler installfrom thegh-pagesroot. - Test whether the site will build without errors.
- Commit the resulting updated files.
While working on and testing this workflow, commits should probably go to afeaturebranch so it can be reviewed that the workflow works as expected.
Once the workflow has stabilized, it should be decided whether the changes should still be committed to a feature branch with the workflow opening a PR so the results will always be reviewed before the site is updated or to allow the workflow to commit to thegh-pagesbranch directly.
I get the impression that the scripting as it is currently assumes a setup with the repo checked out twice like this:
project root at `master` branch
|- bin
|- docs
|- examples
|- library
|- tests
|- project root at `gh-pages` branch
|- __includes
|- _layouts
|- .. etc
Also note that for some of the above steps/actions, there may well be predefined actions available or even additional actions which would be useful to run.
See: https://github.com/marketplace?type=actions
One action which look interesting in this context:
For additional actions (future scope), I'm thinking along the lines of:
- Running a spellchecker over the generated site.
- Running a linter which checks for dead links over the generated site.
@rmccue Have you got any additional context which whomever will work on this should know ?