added drafts to build
This commit is contained in:
parent
5a4dfdbb33
commit
763a80a96b
1 changed files with 24 additions and 1 deletions
25
.build.yml
25
.build.yml
|
@ -5,6 +5,7 @@ packages:
|
||||||
- uv
|
- uv
|
||||||
environment:
|
environment:
|
||||||
site: ficd.sh
|
site: ficd.sh
|
||||||
|
draft_site: draft.ficd.sh
|
||||||
proxy: ficd.srht.site
|
proxy: ficd.srht.site
|
||||||
repo: ficd.sh
|
repo: ficd.sh
|
||||||
zonaref: git+https://git.sr.ht/~ficd/zona@b8b8fef72c741606ed1165a0c07c42cca8060176
|
zonaref: git+https://git.sr.ht/~ficd/zona@b8b8fef72c741606ed1165a0c07c42cca8060176
|
||||||
|
@ -12,7 +13,15 @@ tasks:
|
||||||
- build: |
|
- build: |
|
||||||
if [ "$GIT_REF" = "refs/heads/main" ]; then
|
if [ "$GIT_REF" = "refs/heads/main" ]; then
|
||||||
cd $repo
|
cd $repo
|
||||||
uv run --with "$zonaref" zona build
|
uv run --with "$zonaref" zona build --output public
|
||||||
|
else
|
||||||
|
echo "Skipping build: not on main"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- build_draft: |
|
||||||
|
if [ "$GIT_REF" = "refs/heads/main" ]; then
|
||||||
|
cd $repo
|
||||||
|
uv run --with "$zonaref" zona build --output public-draft --draft
|
||||||
else
|
else
|
||||||
echo "Skipping build: not on main"
|
echo "Skipping build: not on main"
|
||||||
fi
|
fi
|
||||||
|
@ -25,6 +34,14 @@ tasks:
|
||||||
echo "Skipping package: not on main"
|
echo "Skipping package: not on main"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- package_draft: |
|
||||||
|
if [ "$GIT_REF" = "refs/heads/main" ]; then
|
||||||
|
cd $repo/public-draft
|
||||||
|
tar -cvz . > ../public-draft.tar.gz
|
||||||
|
else
|
||||||
|
echo "Skipping package: not on main"
|
||||||
|
fi
|
||||||
|
|
||||||
- upload: |
|
- upload: |
|
||||||
if [ "$GIT_REF" = "refs/heads/main" ]; then
|
if [ "$GIT_REF" = "refs/heads/main" ]; then
|
||||||
hut pages publish -d "$site" $repo/public.tar.gz
|
hut pages publish -d "$site" $repo/public.tar.gz
|
||||||
|
@ -32,3 +49,9 @@ tasks:
|
||||||
else
|
else
|
||||||
echo "Skipping upload: not on main"
|
echo "Skipping upload: not on main"
|
||||||
fi
|
fi
|
||||||
|
- upload_draft: |
|
||||||
|
if [ "$GIT_REF" = "refs/heads/main" ]; then
|
||||||
|
hut pages publish -d "$draft_site" $repo/public-draft.tar.gz
|
||||||
|
else
|
||||||
|
echo "Skipping upload: not on main"
|
||||||
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue