image: archlinux
packages:
- curl
- netlify
- htmlmin
- yuicompressor
sources:
- https://git.sr.ht/~subsetpark/bagatto
secrets:
- 82f3e52d-eef7-46bc-bb2f-4b93c8ce468c
environment:
NETLIFY_SITE_ID: 7d716541-202c-43a6-8ad4-eb5c387597b5
tasks:
- bag: |
curl https://bagatto.co/builds/bag-x86_64-static.v0-6-1.tar.gz -o bag.tar.gz
tar -xvf bag.tar.gz
mv bag bagatto-website/
- build: |
cd bagatto-website
./bag index.janet
- deploy: |
cd bagatto-website
# Only deploy on master.
if [ "$(git rev-parse origin/master)" != "$(git rev-parse HEAD)" ]; then \
complete-build; \
fi
# Source the secrets in ~/.buildsecrets as environment variables.
{
set +x
. ~/.buildsecrets
set -x
}
# Set the Netlify environment variable.
export NETLIFY_AUTH_TOKEN
# Call the deploy.
netlify deploy --site=$NETLIFY_SITE_ID --dir=site --prod