siteleaf-updater v2.0.2
siteleaf-updater
update your index file in your Siteleaf site using your project README file
Why it is necessary
When hosting GitHub Pages, there is a common discrepancy one faces when choosing the place to host their page files.
1. Host it on the master branch
Hosting on the master branch has the advantage that files can be shared with the project (including the README). However, pages usually stand alone without a dependency to or from the project files. Hence, there might be numerous commits that cause an avoidable overhead to merges, CI, and pulls.
2. Host it on a dedicated branch
Hosting the pages on a dedicated branch (e.g., gh-pages
) has the benefit that this beforementioned overhead is avoided.
Separate concerns are rooted in separate trees, just as it is supposed to be.
However, normally, developers only want to publish their README with a few additions.
There is no integrated way or known method in GitHub to sync the README file without hooks or different workarounds.
That circumstance impairs common maintenance and automation requirements.
Solution
- Use Siteleaf, and publish or sync to a dedicated branch on GitHub.
- Create a page and assign it a path (by default,
index
). - Setup your CI to use
siteleaf-updater
for automated doc updates.
Parameters
CLI Parameter | Environment Variable | Default | Description |
---|---|---|---|
api_key | SITELEAF_API_KEY | required | the siteleaf API key |
api_secret | SITELEAF_API_SECRET | required | the siteleaf API secret |
site | SITE_ID | required | the siteleaf site id to be updated |
page | PAGE_NAME | index | the siteleaf page path to be updated |
file | MD_FILE | README.md | the name of the Markdown file to read |
publish | - | false | publish the site after updating |