docs(README): add sample publishing
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user