From 5dd4ae4f3d2cdda2085b137e21a83b38431ac0ec Mon Sep 17 00:00:00 2001 From: klemek Date: Tue, 21 Apr 2026 00:02:37 +0200 Subject: [PATCH] docs(README): add sample publishing --- README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/README.md b/README.md index 704644b..075a40e 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,9 @@ - [Create/update page with redirect](#createupdate-page-with-redirect) - [Create/update page with proxy](#createupdate-page-with-proxy) - [Delete page](#delete-page) +- [Publishing your site to your stapler server](#publishing-your-site-to-your-stapler-server) + - [Sample github actions](#sample-github-actions) + - [Redirecting hosts with DNS](#redirecting-hosts-with-dns) - [Docker](#docker) @@ -181,6 +184,45 @@ curl -X DELETE \ https://stapler-host/my-project/ ``` +## Publishing your site to your stapler server + +* Create first your token +* See [Create/update page from gzip](#createupdate-page-from-gzip) + +### Sample github actions + +```yaml + deploy: + name: Deploy + needs: build + runs-on: ubuntu-latest + steps: + - name: Download artifact + uses: actions/download-artifact@v8 + with: + name: production-files + path: ./dist + - name: Create archive + run: tar -czC dist -f dist.tar.gz . + - name: Deploy to Stapler server + run: curl -X PUT -H 'X-Token: ${{ secrets.STAPLER_TOKEN }}' -H 'X-Host: ${{ vars.TARGET_HOST }}' --data-binary "@dist.tar.gz" https://stapler-host/my-project/ +``` + +### Redirecting hosts with DNS + +**Root host** (e.g. `example.com`) + +| name | type | value | +| - | - | - | +| `@` | `A` | (server ipv4) | +| `@` | `AAAA` | (server ipv6) | + +**Subdomain** (e.g. `www.example.com`) + +| name | type | value | +| - | - | - | +| `(subdomain)` | `CNAME` | (server host). | + ## Docker Stapler ships with a deploy-ready `Dockerfile` and a sample `docker compose` stack with: