By integrating Github webhooks and CircleCI, your website can be deploy automatically after finishing writing.

Once auto deploy is set correctly, the only thing you need to do to add a new post is to open a browser and write an issue.

How it works

The schematic. And there is a demo repository


How to do

Brief steps

Again, the entire setup steps does not require a local environment

Detail procedures

CircleCI Token

Login CircleCI via GitHub, get CircleCI token, named ci-token

Please note that CircleCI will get all permissions of your projects, including private projects

GitHub Tokens

Login GitHub, goto access token page, create two tokens:

GitHub repository

There should be two branches in the repository

master branch

CircleCI and AcyOrt config files will be put in this branch. The folders structure:

├─ .circleci
├  └─ config.yml
└─ config.yml
# .circleci/config.yml
version: 2
      - image: node:latest

    working_directory: ~/acyort

        - master # config branch

      - checkout
      - run: npm install acyort -g
      - run: acyort init 
      - run: cp config.bak.yml config.yml 
      - run: npm i # optional, if have plugins
      - run: acyort build  
      - run: git checkout .  
      - run: git checkout gh-pages # static files branch
      - run: git reset --hard origin/gh-pages
      - run: cp -R public/* . 
      - run: rm config.bak.yml 
      - run: rm -R scripts themes public 
      - run: git add .
      - run: git config "username" # your GitHub username
      - run: git config "email" # your GitHub email
      - run: git commit -m "Updated by circleci - `date`"
      # fill your usename, repository below 
      - run: git push -q https://${gh_token} gh-pages:gh-pages 

You can set git commit timezone

run: git commit -m "Updated by CircleCI - `TZ='Asia/Shanghai' date`"

# config.yml
# only show important fields

user:  # set your GitHub username
repository:  # set your GitHub repository

public_dir: public # important, same as CircleCi config: public
timezone:  # set your timezone
token:  # your `read-token` from github 

gh-pages branch

it must exist. generated static files will be put in this branch.

CNAME file should be put here if there is one.

.gitignore file should be set here


CircleCI settings

Login CircleCI, click PROJECTS, add the repo above, select platform Linux & Node, click Start building. (It will fail because of missing token)

Repository settings

Login GiHub, goto repository settings page, add webhooks

Set Payload URL

CircleCI build trigger API is /project/:vas-type/:username/:project/tree/:branch. so, webhook URL will be something like

Select Content type

Use application/json

Select Trigger events

On Let me select individual events, only check the Issues field


Enjoy writing on Github issues.