652770110af5d65c698c34ccee2a31d74acd0f33 — Adnan Maolood 2 years ago bc1bb1a
Add publishing instructions
1 files changed, 45 insertions(+), 0 deletions(-)

A content/03-publish.gmi
A content/03-publish.gmi => content/03-publish.gmi +45 -0
@@ 0,0 1,45 @@
title: Publish your site
  slug: publish

Now that you have successfully built your site, you can host it wherever you like.

One option for static site hosting is sourcehut pages.
=> //srht.site sourcehut pages

Follow the instructions on the sourcehut pages site to get started. To build your site tarball, run the following:

kiln build
tar -C public -cvz . > site.tar.gz

You can then upload the resulting tarball to sourcehut pages with curl.

If you are using sourcehut git to host your site source code, you can add the following build manifest to your site to publish your site automatically after every commit:

image: alpine/edge
oauth: pages.sr.ht/PAGES:RW
- kiln
  site: example.com # Replace with your domain
- https://git.sr.ht/~user/$site # Replace with your repository
- build: |
    cd $site
    kiln build
- package: |
    cd $site
    tar -C public -cvz . > ../site.tar.gz
- upload: |
    acurl -f https://pages.sr.ht/publish/$site \
      -Fcontent=@site.tar.gz \

=> https://man.sr.ht/builds.sr.ht/ sourcehut builds documentation