Hosting a Static Site on Pantheon

Pantheon is great at hosting Drupal or WordPress sites, but what about static websites? To have a static site hosted on Pantheon…

  1. On Pantheon, click Create a Site

    1. Select Custom Upstream

    2. Empty (Drupal 8+)

  2. Enter the name of the site, making sure to match the GitHub Repository’s name

    1. For example: For https://github.com/kalamuna/nmaig , use “nmaig”

  3. Click Continue

  4. Wait for Pantheon to build the site

  5. In the GitHub repository, add a pantheon.yml

    1. # Put overrides to your pantheon.upstream.yml file here. # For more information, see: https://pantheon.io/docs/pantheon-yml/ api_version: 1 web_docroot: true enforce_https: full+subdomains
  6. Update the build process to build to a “web” directory

  7. Add a .gitignore-deploy file to ignore the node_modules directory

    1. node_modules
  8. Add the GitHub Actions Deploy Script, along with the DEPLOY_REPO GitHub Actions Repository Variable

  9. Push some code to trigger GitHub Actions and fix any errors that may be reported

  10. Visit the Pantheon Dashboard and monitor any code syncing