I Have a Git Repo¶
If you’re using Git and a static site generator (or want to use them), Teahouse supports uploading directly from CI/CD.
Currently, we support these CI/CD providers:
GitHub Actions
1. Create & configure your site¶
Configure your repo on the site page, set it to
github.com/YOURNAME/YOURPROJECT
(making the appropriate substitions)
2. Add Teahouse to your pipeline¶
We have written several actions to make it as easy as possible to upload from GitHub Actions
A minimal (no build step) sample might look like:
name: Publish
on:
push:
branches:
- trunk
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
concurrency:
group: "teahouse"
cancel-in-progress: false
jobs:
publish:
environment:
name: teahouse
url: https://example.teahouse.page
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Upload
uses: teahouse-hosting/upload@trunk
with:
domain: example.teahouse.page
root: .
Note that this only attempts a build on your main branch and does not handle forks. A more full-featured example can be found in this site’s own repo. More details about how the action works can be found in the reference docs
At this time, we do not have authentication options for other CI/CD sytems. We are looking to add them in the future.