Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33
A GitHub Action that automatically generates & updates markdown content (like your README.md)
License
muesli/readme-scribe
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A GitHub Action that automatically generates & updates markdown content (like your README.md)
- Create amarkscribe template andplace it anywhere in a repository that you automatically want to update. In thisguide we will use
templates/README.md.tpl
.
You can find an example template that I use to automatically update my GitHubprofile here:https://github.com/muesli/markscribe/blob/master/templates/github-profile.tpl
- In order to access some of GitHub's API, you need to provide a valid GitHubtoken as a secret called
PERSONAL_GITHUB_TOKEN
. You can create a new token bygoing to your profile settings:
Developer settings
>Personal access tokens
>Generate new token
Depending on your template you will need access to different API scopes. If youwant to support the full set of features, tick the checkboxes next to thesescopes:read:user
,repo:status
,public_repo
,read:org
. Check out themarkscribe documentation for a detailedlist of required scopes for each individual template function.
Now create a new secret in your repository'sSettings
and enter that token.
- Create a new GitHub workflow in your repository:
.github/workflows/readme-scribe.yml
name:Update READMEon:push:schedule: -cron:"0 */1 * * *"jobs:markscribe:runs-on:ubuntu-lateststeps: -uses:actions/checkout@master -uses:muesli/readme-scribe@masterenv:GITHUB_TOKEN:${{ secrets.PERSONAL_GITHUB_TOKEN }}with:template:"templates/README.md.tpl"writeTo:"README.md" -uses:stefanzweifel/git-auto-commit-action@v4env:GITHUB_TOKEN:${{ secrets.GITHUB_TOKEN }}with:commit_message:Update generated READMEbranch:maincommit_user_name:readme-scribe 🤖commit_user_email:actions@github.comcommit_author:readme-scribe 🤖 <actions@github.com>
Careful: if you usemaster
instead ofmain
as the default branch, you willneed to update the above config forgit-auto-commit-action
accordingly.
This action will be triggered once per hour, parsestemplates/README.md.tpl
and generates a newREADME.md
for you, and eventually pushes the changes tothemaster
branch. Make sure to adjust the input valuestemplate
andwriteTo
to suit your needs.
About
A GitHub Action that automatically generates & updates markdown content (like your README.md)
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Contributors2
Uh oh!
There was an error while loading.Please reload this page.