The new implementation is available at noraworld/github-to-qiita. It is easy to use because it uses GitHub Actions, which means you do not have to prepare your own server. Happy publishing!
This repository is no longer maintained.
Pushing development articles into the specific repository, they will be published to Qiita via Qiita API v2.
- When new file is added to GitHub repository, it will be published to Qiita as a new item
- When the existing file is modified on GitHub repository, the corresponding Qiita item will be modified
The multiple files of addition and modification are supported. When the multiple files are added and modified by one pushing, all of them will be published and modified at one time.
- Visit
https://github.com/<GITHUB_USERNAME>/<GITHUB_REPOSITORY>/settings/hooks/new - Fill in the mandatory information
- Click
Add webhookbutton
| Item | Description | Example | Note |
|---|---|---|---|
| Payload URL | Your URL that can receive GitHub Webhooks | https://example.com/payload |
The path must be /payload |
| Content type | Select application/x-www-form-urlencoded |
||
| Secret | The random string | 35517d2a37e38bf9c8b5ac2f24fe34fb8e2b1510 |
This token must not be known by other people |
| SSL verification | Select Enable SSL verification |
||
| Which events would you like to trigger this webhook? | Select Just the push event. |
||
| Active | Check |
TIPS: You can generate the random string for Secret by ruby -rsecurerandom -e 'puts SecureRandom.hex(20)' easily.
- Visit https://github.com/settings/tokens/new
- Fill in the mandatory information
- Click
Generate tokenbutton - Copy generated token and save it to other place temporarily

| Item | Description | Example | Note |
|---|---|---|---|
| Note | Your access token’s name | GitHub to Qiita |
|
| Select scopes | Check repo |
- Visit https://qiita.com/settings/tokens/new
- Fill in the mandatory information
- Click generate button
- Copy generated token and save it to other place temporarily

| Item | Description | Example | Note |
|---|---|---|---|
| Description | Your access token’s name | GitHub to Qiita |
|
| Scopes | Check read_qiita and write_qiita |
- Copy
.env.sampleto.env(Executecp .env.sample .env) - Fill in the mandatory information
- Save file
.env
| Variable | Description | Example | Note |
|---|---|---|---|
| GITHUB_REPOS | Your developers blog repository name with username on GitHub | noraworld/developers-blog-content |
|
| INCLUDED_DIR | Only the contents in the directory specified by this env will be tracked | articles |
The trailing slash is unnecessary |
| QIITA_ACCESS_TOKEN | Your personal Qiita access token generated a moment ago | 777fb820e25847dd659266a66dcdd99580b4b85f |
This token must not be known by other people |
| GITHUB_WEBHOOK_SECRET_TOKEN | Your GitHub webhook secret token filled in on GitHub Webhooks settings page a moment ago | 35517d2a37e38bf9c8b5ac2f24fe34fb8e2b1510 |
This token must not be known by other people |
| GITHUB_PERSONAL_ACCESS_TOKEN | Your GitHub personal access token generated a moment ago | d77af6cff2dd13f58886f6eff890eea93e53bdc9 |
This token must not be known by other people |
Run main.rb at the domain specified at Payload URL on GitHub Webhooks settings.
$ ruby main.rbDaemonize this script if needed.