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…
On Pantheon, click Create a Site
Select Custom Upstream
Empty (Drupal 8+)
Enter the name of the site, making sure to match the GitHub Repository’s name
For example: For https://github.com/kalamuna/nmaig , use “nmaig”
Click Continue
Wait for Pantheon to build the site
In the GitHub repository, add a pantheon.yml
# 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
Update the build process to build to a “web” directory
Add a
.gitignore-deploy
file to ignore thenode_modules
directorynode_modules
Add the GitHub Actions Deploy Script, along with the
DEPLOY_REPO
GitHub Actions Repository VariablePush some code to trigger GitHub Actions and fix any errors that may be reported
Visit the Pantheon Dashboard and monitor any code syncing