mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
chore: improve deploy script
This commit is contained in:
parent
8fc89854cc
commit
a909c07f18
@ -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
|
4
admin/userguide/.github/workflows/deploy.yml
vendored
4
admin/userguide/.github/workflows/deploy.yml
vendored
@ -4,7 +4,7 @@ name: Deploy Production
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user