Skip to content

GH Actions workflow that builds documentation on each push #31415

@mkoeppe

Description

@mkoeppe

On each push to a branch in sagemath/sagetrac-mirror, it builds the HTML documentation and, if this succeeds, deploys it to netlify for easy inspection.
Example: https://62018055188ce050610e98a6--sagemath-tobias.netlify.app
Workflow runs: https://github.com/sagemath/sagetrac-mirror/actions/workflows/doc-build.yml

Once this ticket is merged, I will add a badge pointing to the github workflow (similar to the linting badge), where one then can get the url for this particular deployment. Due to various open issues at netlify, it is sadly not possible right now to set the deployment url to the branch name so we use the commit hash for this.

For pushes to the develop branch it deploys the docs to the 'production' website
https://sagemath-tobias.netlify.app/

I've chosen netlify (say over github pages) mainly since it easily allows to push multiple versions of the same page under different urls (and does an intelligent diff so that the upload is smaller).

Related: sagemath/documentation#24 #33263 #33294

Follow-up:

  • Change the deployment url to something more official. For this reason, I've created the site sagemath-tobias.netlify.org, so if you want to create an official sage account, sagemath.netlify.org is still available. Then one just needs to change the secrets in the github repo.

  • Incorporate the post-fixes of https://github.com/sagemath/documentation into the main repo here, so that the preview looks the same as the published page.

  • For pushes with tags (or to master), publish it on docs.sagemath.org website (for example using https://github.com/marketplace/actions/deploy-to-github-pages or by completely migrating to netlify).

CC: @slel @jhpalmieri @haraldschilly @williamstein @tobiasdiez @kwankyu @vbraun

Component: website/wiki

Author: Tobias Diez

Branch: 31665de

Reviewer: Matthias Koeppe

Issue created by migration from https://trac.sagemath.org/ticket/31415

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions