https://github.com/gofunky/siteleaf-updater
update the index file of your project's siteleaf project with your repository's README.md file
https://github.com/gofunky/siteleaf-updater
action ci docs github-actions github-pages index markdown npm readme siteleaf siteleaf-site siteleaf-updater sync update
Last synced: 5 months ago
JSON representation
update the index file of your project's siteleaf project with your repository's README.md file
- Host: GitHub
- URL: https://github.com/gofunky/siteleaf-updater
- Owner: gofunky
- License: mit
- Created: 2019-03-04T21:07:53.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-11-01T14:00:12.000Z (8 months ago)
- Last Synced: 2025-11-27T10:37:16.872Z (7 months ago)
- Topics: action, ci, docs, github-actions, github-pages, index, markdown, npm, readme, siteleaf, siteleaf-site, siteleaf-updater, sync, update
- Language: JavaScript
- Homepage: https://siteleaf-updater.gofunky.fun
- Size: 589 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 44
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# siteleaf-updater
[](https://github.com/gofunky/siteleaf-updater/actions)
[](https://app.renovatebot.com/dashboard#github/gofunky/siteleaf-updater)
[](https://libraries.io/npm/siteleaf-updater)
[](https://snyk.io/test/github/gofunky/siteleaf-updater)
[](https://standardjs.com)
[](https://www.codefactor.io/repository/github/gofunky/siteleaf-updater)
[](https://www.npmjs.com/package/siteleaf-updater)
[](https://www.npmjs.com/package/siteleaf-updater)
[](https://www.npmjs.com/package/siteleaf-updater)
[](https://github.com/gofunky/siteleaf-updater/blob/master/LICENSE)
[](https://github.com/gofunky/siteleaf-updater/commits/master)
update the index file of your project's siteleaf project with your repository's README.md 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 GitHub Pages 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's 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.
This circumstance impairs common maintenance and automation requirements.
## Solution
1. Use [Siteleaf](https://www.siteleaf.com/), and publish or sync to a dedicated branch on GitHub.
2. Create a page and assign it a path (i.e. `index` by default).
3. Setup your CI to use `siteleaf-updater` for automated doc updates.
## Parameters
| Action Input | CLI Parameter | Environment Variable | Default | Description |
| ------ | ------ | ------ | ------ | ------ |
| api-key | api-key | SITELEAF_API_KEY | *required* | the API key that grants access to the repository's siteleaf project |
| api-secret | api-secret | SITELEAF_API_SECRET | *required* | the API secret that grants access to the repository's siteleaf project |
| site | site | SITELEAF_SITE | *required* | the id of the siteleaf site to be updated |
| page | page | SITELEAF_PAGE | `index` | the target page of the siteleaf site to be updated |
| file | file | SITELEAF_MD_SOURCE | `README.md` | the path to the local Markdown file to push |
| publish | publish | - | `false` | allows publishing the site after its update |
## Action Example
```yaml
steps:
- name: update site
uses: gofunky/siteleaf-updater@v2
with:
api-key: ${{ secrets.SITELEAF_KEY }}
api-secret: ${{ secrets.SITELEAF_SECRET }}
site: 'my-site'
page: 'contribution'
file: 'CONTRIBUTION.md'
publish: true
```