29 lines
712 B
YAML
29 lines
712 B
YAML
image: nixos/latest
|
|
sources:
|
|
- https://git.sr.ht/~cyplo/blog
|
|
|
|
oauth: pages.sr.ht/PAGES:RW
|
|
|
|
secrets:
|
|
- 6c23a8c1-7a30-4a7e-b3b7-0171e898a7d3
|
|
|
|
environment:
|
|
site: blog.cyplo.dev
|
|
|
|
tasks:
|
|
- fetch_tools: |
|
|
cd blog
|
|
nix-shell --pure --run 'date'
|
|
- build: |
|
|
cd blog
|
|
nix-shell --pure --run 'hugo --gc --minify'
|
|
- package: |
|
|
tar -C blog/public -cvz . > site.tar.gz
|
|
- upload: |
|
|
acurl -f https://pages.sr.ht/publish/$site -Fcontent=@site.tar.gz
|
|
- github_push: |
|
|
set +xv
|
|
cd blog
|
|
GITHUB_TOKEN=`cat ~/.github_token`
|
|
git remote add github https://cyplo:$GITHUB_TOKEN@github.com/cyplo/blog.git
|
|
nix-shell --pure --run 'git push github --all --force'
|