Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
hantang committed Oct 15, 2024
1 parent e976f6c commit c9aeca2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy Webpage
name: Deploy

on:
push:
Expand Down Expand Up @@ -26,7 +26,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- run: pip install -r requirements.txt
# - run: pip install -r requirements.txt
- name: Build Data
run: bash deploy.sh ${{ env.OUT }}
- name: Setup pages
Expand Down
9 changes: 7 additions & 2 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@ set -eu
TARGET="${1:-site}"
SOURCE="${2:-web}"

echo "install deps"
pip install -r requirements.txt >/dev/null 2>&1

if [[ -d $TARGET ]]; then
echo "clean $TARGET"
rm -rf $TARGET
fi

python scripts/parse.py data $SOURCE/data
cp -r $SOURCE $TARGET/
echo "Update data"
python scripts/parse.py data $SOURCE/data >/dev/null 2>&1
cp -r $SOURCE $TARGET

echo "Done"

0 comments on commit c9aeca2

Please sign in to comment.