Skip to content

Commit

Permalink
chore: improve deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed May 17, 2024
1 parent 8fc8985 commit a909c07
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@
# codeigniter4/userguide repo's master branch.
# See https://github.com/codeigniter4/userguide/blob/master/.github/workflows/deploy.yml

REPO=/opt/userguide
SITE=/home/public_html/userguides/userguide4
REPO="/opt/userguide"
SITE="/home/public_html/userguides/userguide4"

if [ "$(id -u)" = "0" ]; then
echo "Cannot be run as root. Please run as the user for deployment."
exit 1
fi

cd "$REPO"
git switch master
Expand Down
4 changes: 2 additions & 2 deletions admin/userguide/.github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Deploy Production

on:
push:
branches:
branches:
- master

jobs:
Expand All @@ -19,4 +19,4 @@ jobs:
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
script: /opt/userguide/.github/scripts/deploy
script: /opt/userguide/.github/scripts/deploy.sh

0 comments on commit a909c07

Please sign in to comment.