Skip to content

Commit

Permalink
fix: website deployment script (#17)
Browse files Browse the repository at this point in the history
Signed-off-by: Steven E Wright <StevenEWright@users.noreply.github.com>
  • Loading branch information
StevenEWright committed Aug 12, 2023
1 parent e979c35 commit c6b3220
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
- name: Checkout source code
uses: actions/checkout@v2
- run: ./ci
- run: ./website
- name: Prepate git remote
run: |
git remote set-url origin git@github.com:kullna/editor.git
Expand All @@ -36,6 +35,7 @@ jobs:
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: ./website gen
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
Expand Down
21 changes: 20 additions & 1 deletion ci
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ cat << "EOF"
└─────────────────────────────────────────────────────────────────────────────┘
EOF

if [ -z "$(npm install -s)" ]; then
if [ -z "$(npm install --ignore-scripts -s)" ]; then

echo -e $Green
echo " ✅ Dependencies installed"
Expand Down Expand Up @@ -94,6 +94,25 @@ else
echo " 📝 Try running: npm run lint:fix - are your husky scripts broken?"
fi

cat << "EOF"
┌─────────────────────────────────────────────────────────────────────────────┐
│ 🌐 Website... │
└─────────────────────────────────────────────────────────────────────────────┘
EOF

size_result=0
./website gen || size_result=$?
if [ $size_result -eq 0 ]; then
echo -e $Green
echo " ✅ Website built!"
echo -e $Color_Off
else
echo -e $Red
echo " ❌ An error occurred while building the website."
echo -e $Color_Off
fi

cat << "EOF"
┌─────────────────────────────────────────────────────────────────────────────┐
│ 🐰 Checking Size... │
Expand Down

0 comments on commit c6b3220

Please sign in to comment.