Skip to content

Commit

Permalink
Merge pull request #8900 from kenjis/update-deploy-script
Browse files Browse the repository at this point in the history
chore: improve user guide deploy script
  • Loading branch information
kenjis authored May 23, 2024
2 parents 9d54096 + a909c07 commit 47cb203
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 47cb203

Please sign in to comment.