Skip to content

Commit

Permalink
Update deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
hantang committed Oct 27, 2024
1 parent ee067d7 commit 21d6f34
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,18 @@ jobs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
env:
TARGET: site

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/configure-pages@v4
- name: Build
run: bash deploy.sh ${{ env.TARGET }}
- uses: actions/upload-pages-artifact@v3
with:
path: "./src/site"
path: ${{ env.TARGET }}
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ Search your bookmarks in a more flexible way.
- web online version:
![snapshot](images/snapshot-web.png)

## Changelog

- :tada: Add `pintree` page, forked from [Pintree-io/pintree](https://github.com/Pintree-io/pintree).

## More

Expand Down
21 changes: 16 additions & 5 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
#!/usr/bin/env bash
set -eu
TARGET="${1:-site}"
SOURCE="${2:-src}"

TARGET="site"
ignores=("manifest.json" "popup.html")

pwd
echo "target: ${TARGET} / source: ${SOURCE}"

if [[ -d $TARGET ]]; then
echo "*** clean $TARGET"
rm -rf $TARGET
echo "*** clean $TARGET"
rm -rf $TARGET
fi
cp -r src/$TARGET ./$TARGET

echo "copy to target"
cp -r ${SOURCE} ./$TARGET

echo "clean to ignores"
for name in "${ignores[@]}"; do
if [[ -f $TARGET/$name ]]; then
rm -rf $TARGET/$name
fi
done

echo "Done"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bookmark-search",
"version": "0.3.0",
"version": "0.4.0",
"description": "HTML Bookmark Search with RegExp",
"main": "main.js",
"keywords": [
Expand Down

0 comments on commit 21d6f34

Please sign in to comment.