Using GitHub

How GitHub can be used to store files or instructional content.

You can sync the following resources with GitHub:

  • Files for your content

  • Instructional content

The sync is currently uni-directional. In order to sync files from a GitHub repository, the GitHub account must allow access to Next Tech's GitHub OAuth application.

Getting GitHub Access

As an admin or editor, navigate to your organization page and select the GitHub option:

Authorize GitHub Access

Select Allow GitHub Repository Access.

Next Tech will request access to your GitHub repo. Permission for third party access may be needed from within GitHub. Information about granting access can be found here.

Linking GitHub Repo to a Content

While in the creator, navigate to the "Settings" in the left navigation menu, and scroll down to "GitHub Sync Settings". Here you add both a base repository and a markdown repository. Often, these two values will be the same. Add the URL for the account and the root of the repo that should be linked.

GitHub Sync Settings

GitHub File Links

GitHub file links specifies the path to the files that should be included in the user's project. Clicking the + New Link button will display two text fields, "Remote Path" and the "Local Path". The remote path contains the full path to directory in the repo that should be synced, excluding the account and root. The local path is the directory to sync the files to.

Be careful when copy and pasting GitHub paths, this can often introduce unintentional spaces and characters that will break the sync.

Once those variables have been set, the sync can be forced by clicking the Files drop down in the upper right corner of the screen and selecting Sync GitHub.

File options

The sync will produce one of two options:

Successful confirmation
Negative confirmation indicates a repository or path may be incorrect.

Once the files have synced successfully, save the files by clicking Save Files.

Linking GitHub Instructions

To sync markdown files into the instruction pane, select + New Block and then the Markdown option. Make sure you select the option with the GitHub logo. This will display a text field for the full path, minus the values set in the "GitHub Sync Settings". To force sync the instructions, select the GitHub logo in the bottom right of the instruction pane.

Syncing in markdown from GitHub will also download any images not hosted by Next Tech, upload them to Next Tech's file storage (hosted by Filestack), and then update the contents of the markdown file in GitHub with the new URLs. This allows you to ensure that images hosted externally or only accessible within the GitHub repo will still be displayed as expected inside the markdown in Next Tech.