Make it easier to run workflows locally with 'act'

This commit is contained in:
daz
2024-04-11 11:56:01 -06:00
parent ea328a863d
commit 33741bd2bb
2 changed files with 19 additions and 5 deletions

23
build
View File

@@ -3,8 +3,21 @@
cd sources
npm install
if [ "$1" == "all" ]; then
npm run all
else
npm run build
fi
case "$1" in
all)
nprm run all
;;
act)
# Build and copy outputs to the dist directory
npm run build
cd ..
cp -r sources/dist .
# Run act
$@
# Revert the changes to the dist directory
git co -- dist
;;
*)
npm run build
;;
esac