QuantEcon / meta

For issues and discussion covering more than one repository
0 stars 0 forks source link

[infrastructure] Review automatic deployment for python lectures #36

Closed mmcky closed 1 year ago

mmcky commented 4 years ago

We now have the technical knowledge to automatically deploy the python lectures using Github Actions. So it is worth having a discussion to see if we would like to progress to automatic deployment for the python lectures.

When using a pull request (PR) we now have checks in place for:

  1. execution testing against the latest anaconda software for changed lectures
  2. external link checking for changed lectures
  3. preview html support via netlify

The current publication pathway for the live site is via our build instance (hosted on aws).

If we were to enable automatic deployment to the live site via Github Actions we would need to review our operating procedures to ensure all content changes are submitted via a Pull Request.

The proposed workflow would be:

  1. Setup a PR for any content changes and the PR would a) complete execution testing, b) check external links and c) build an html preview
  2. Author of PR would need to review the html preview
  3. Once PR is merged into the master branch a build of html and pdf would commence to update the live site.

This workflow would be important as any push directly to the master branch would cause a live deployment. The benefits of automatic deployment are that anyone with permissions to merge a PR can update the live site in a decentralised way.

Some technical notes from initial research work:

  1. the Github Actions cache mechanism is limited and doesn't work between PR's. It is really designed for long term files that aren't changing regularly. I have had a conversation with GitHub engineering to confirm. The best way forward to build html previews that are always up to date from a cache would be to sync the _build folder to an s3 bucket such that a PR and master builds would update that bucket using s3 cli. (See #14)
mmcky commented 1 year ago

This has now been done using GitHub actions