Publish

Following the articles Quick start with sourcehut pages and Automating deployments.

  1. Generate a personal access token
  2. Create file .build.yml and add:
    image: alpine/edge
    oauth: pages.sr.ht/PAGES:RW
    packages:
    - hut
    - npm
    secrets:
    - [redacted]
    sources:
    - git@git.sr.ht:~monomonnik/monomonnik.srht.site
    environment:
      site: monomonnik.srht.site
    tasks:
    - setup: |
        set +x
        cd $site
        npm install
        npm run build
    - package: |
        cd $site
        tar -C dist -cvz . > ../site.tar.gz
    - upload: |
        hut pages publish -d $site site.tar.gz