ci: don't rebuild db every time

This commit is contained in:
əlemi 2024-03-26 00:51:28 +01:00
parent 71acddb766
commit b84a682ed4
Signed by: alemi
GPG key ID: A4895B84D311642C

9
.tci
View file

@ -6,13 +6,8 @@ echo "stopping service"
systemctl --user stop upub systemctl --user stop upub
echo "installing new binary" echo "installing new binary"
cp ./target/release/upub /opt/bin/upub cp ./target/release/upub /opt/bin/upub
echo "rebuilding database" echo "migrating database"
DB="/srv/tci/upub.db" /opt/bin/upub --db "sqlite:///srv/tci/upub.db" --domain https://feditest.alemi.dev migrate
cp "$DB" "$DB.bak"
rm "$DB"
touch "$DB"
/opt/bin/upub --db "sqlite://$DB" --domain https://feditest.alemi.dev migrate
/opt/bin/upub --db "sqlite://$DB" --domain https://feditest.alemi.dev faker
echo "restarting service" echo "restarting service"
systemctl --user start upub systemctl --user start upub
echo "done" echo "done"