GitHub: Basic Implementation

1. Create the repository

  1. Go to github.com, click the + icon in the top-right corner, and choose New repository.
  2. Choose the Owner. Pick the organization the repository should belong to.
  3. Enter a Repository name.
  4. Set Visibility to Private (recommended) or Public.
  5. Click Create repository.

The repository can be empty. WCH does not require a README, and any branch name works.

2. Connect GitHub in WCH

WCH connects to GitHub through an OAuth app. You authorize it once per project with your own GitHub account, and WCH stores the token for that project.

  1. Open your project, then Extensions, then Deployments.
  2. Click Connect GitHub.
  3. In the GitHub window, approve the WCH app. It asks for repository access and your basic profile.

3. Link the repository

  1. On the Deployments page, click Link Repository.
  2. Under Select Repository, choose the repository from the list.
  3. Under Branch, enter the branch WCH should commit to. It defaults to the repository's default branch.
  4. Click Link Repository.

You can link more than one repository. One is marked active with a star, and that is the one the Dashboard's Publish button uses. When several are linked, the Dashboard asks which repository to publish to.

What WCH pushes

  • Individual files, not a zip. The full site tree is committed to the branch you chose.
  • One commit and one tag per publish. The tag is named wes-publish- followed by a timestamp.
  • Nothing when nothing changed. If the site is identical to the last push, WCH skips the commit.
  • No deletions. Files removed from your site stay in the repository until you remove them.

Framework folders (optional)

If the repository is an application rather than a static site, open the repository's settings on the Deployments page and choose the app type: Laravel App?, Rails App?, or Javascript App?. Then enter the folder name in Rails Folder. WCH writes the site into the framework's views directory, for example app/views/your-folder for Rails or resources/views/your-folder for Laravel.

FAQ

I can't see my repository in the dropdown

  • WCH lists repositories you own, collaborate on, or can see as an organization member, sorted by most recently updated. Only the 100 most recent appear. Push a commit to the repository to move it up the list.
  • If the organization restricts third-party OAuth apps, an org owner must approve the WCH app. In GitHub, open the organization's Settings, then Third-party access, find the WCH app in the pending requests, and grant it access.

Can I roll back?

Every publish has a tag. Check out or reset to an earlier wes-publish- tag in your repository to restore that build.