Skip to content

Author a Document via GitHub

Objective

Using the GitHub website, you will create a snapshot of an example document in Baseprint Document Format (BDF). This format is required to publish a document succession. You will also see a preview generated for the example Baseprint document snapshot.

Alternatives

Prerequisites

  • A GitHub account

Steps

1. Create a repository

First, create a new repository from a repository template. This new repository will contain:

  • source text files in LaTeX format and
  • a GitHub Actions workflow file that automatically generates Baseprint snapshots and previews.

These files will be copied from this Baseprinter repository template. The workflow file is located at .github/workflows/pages-deploy.yaml.

Create repository from the template

2. Enable GitHub Pages

Follow these substeps to publish to GitHub Pages:

  • On GitHub, navigate to your site's repository.
  • Under your repository name, click Settings (it might be a tab or in a dropdown menu).
  • In the Code and automation section of the sidebar, click Pages.
  • Under Build and deployment, under Source, select GitHub Actions.

3. Edit the document

  • Click the Code tab.
  • Click the document.tex file.
  • Click the pencil icon above and to the right of the document text.
  • Edit some text of the document.
  • Click the Commit changes... and then Commit changes buttons.

4. Show the preview URL

  • Click the Code tab of https://github.com/<username>/<reponame>.
  • Click the gear icon to the right of About.
  • In the Website field, enter the URL https://<username>.github.io/<reponame>/.
  • Click the Save changes button.

Note that <username> and <reponame> should be replaced with your GitHub username and repository name.

5. See the status of the preview job (Optional)

  • Click the Actions tab.
  • Click the workflow in progress: "Deploy Baseprint preview to GitHub Pages".
  • Wait for the workflow to complete successfully.
  • Click on the link https://<username>.github.io/<reponame>/ under the "deploy" job.

Conclusion

You now have a preview of your Baseprint document snapshot available at https://<username>.github.io/<reponame>/. This preview will be automatically updated whenever there are changes to the repository.

The Baseprint document snapshot has been saved in the autobaseprint branch as a directory (git tree) named baseprint.

Questions or Feedback

If you have any questions or feedback, feel free to contact Castedo.