~sircmpwn/pages.sr.ht-examples

adeada230a11808a2bf744166886975b3e327bb2 — Mike Lake 2 years ago b28a713
Added example for a MkDocs static site on Debian.
1 files changed, 32 insertions(+), 0 deletions(-)

A debian_mkdocs.yml
A debian_mkdocs.yml => debian_mkdocs.yml +32 -0
@@ 0,0 1,32 @@
# Build manifest for a site using MkDocs on Debian
image: debian/stable
oauth: pages.sr.ht/PAGES:RW

environment:
  site: your-username.srht.site

packages:
  - python3-venv

tasks:
- build: |
    python3 -m venv mkdocs
    . mkdocs/bin/activate
    python3 -m pip -q install --upgrade pip
    # The macros and the material theme for MkDocs are optional.
    pip install mkdocs mkdocs-macros mkdocs-material
    cd $site
    mkdocs build
    # The MkDocs build by default will create the static site
    # in a directory "site". Do not confuse this with "$site". 
    tar -C site -czf ../site.tar.gz .
- upload: |
    # hut is not yet packaged for Debian, use acurl.
    #hut pages publish -d $site site.tar.gz
    acurl -f https://pages.sr.ht/publish/$site -Fcontent=@site.tar.gz

triggers:
  - action: email
    condition: failure
    to: Your Name <your.email@example.com>