Skip to content

Commit

Permalink
feat: add post github sh
Browse files Browse the repository at this point in the history
  • Loading branch information
cleverboy32 committed Sep 22, 2024
1 parent 547393f commit fb13ff1
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions post-github.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash

npm run build



output_dir="./build_file"
rm -rf $output_dir
mkdir $output_dir
search_dir="./packages/"

for package in `ls $search_dir`; do
package_dist="$search_dir$package/dist/";
cp -r $package_dist $output_dir
done



git stash
git branch -D gh-pages
git fetch -p
git checkout -b gh-pages origin/gh-pages


for file in ./*; do
# echo $file;
if [[ "$file" != "./post-github.sh" &&
"$file" != "./build_file" &&
"$file" != "./packages" &&
"$file" != "./node_modules"
]]; then
rm -r "$file"
fi
done


mv $output_dir/* ./
rm -rf $output_dir

0 comments on commit fb13ff1

Please sign in to comment.