How to Use GitHub Actions with the DigitalOcean App Platform for Shiny Apps

You saw how to deploy Shiny apps to the DigitalOcean App Platform based on existing Docker images, and how to integrate and auto-deploy with GitHub.

In this post, you'll go further and learn how to use GitHub Actions. You'll be able to add testing to the workflow and achieve full continuous integration and deployment (CICD) experience.

A particular issue with the official git-based deployment with the App Platform is that it can take a long time to build the Docker images on every git push event. This is so because the App Platform is not using the Docker image cache.

So let's set up the GitHub workflow to deploy after all tests have passed, and also to use the cache to cut down on build time.

The GitHub Actions workflow to deploy Shiny to the App Platform