This commit is contained in:
parent
937af6a3e5
commit
396afc6d30
@ -10,14 +10,18 @@ jobs:
|
|||||||
deploy:
|
deploy:
|
||||||
runs-on: canina
|
runs-on: canina
|
||||||
steps:
|
steps:
|
||||||
- name: Run deploy.sh (it runs docker on the host)
|
- name: Run deploy.sh from within the scripts folder
|
||||||
env:
|
env:
|
||||||
BRANCH: ${{ github.ref_name }}
|
BRANCH: ${{ github.ref_name }}
|
||||||
run: |
|
run: |
|
||||||
# 1. رفع مشکل DNS
|
# 1. رفع مشکل DNS
|
||||||
echo "87.248.133.138 git.parsaaghayi.ir" >> /etc/hosts
|
echo "87.248.133.138 git.parsaaghayi.ir" >> /etc/hosts
|
||||||
|
|
||||||
# 2. دانلود و اجرای اسکریپت deploy.sh (که دستورات داکر در آن است)
|
# 2. دانلود و اجرای اسکریپت deploy.sh از داخل پوشهی scripts
|
||||||
# اسکریپت مستقیماً روی سرور اجرا میشود و از داکر استفاده میکند
|
mkdir -p scripts
|
||||||
bash -c "$(wget -qO- https://git.parsaaghayi.ir/parsa/canina/raw/branch/main/scripts/deploy.sh)" || \
|
wget -qO scripts/deploy.sh https://git.parsaaghayi.ir/parsa/canina/raw/branch/main/scripts/deploy.sh || \
|
||||||
bash -c "$(wget -qO- https://git.parsaaghayi.ir/parsa/canina/raw/branch/develop/scripts/deploy.sh)"
|
wget -qO scripts/deploy.sh https://git.parsaaghayi.ir/parsa/canina/raw/branch/develop/scripts/deploy.sh
|
||||||
|
|
||||||
|
chmod +x scripts/deploy.sh
|
||||||
|
cd scripts
|
||||||
|
./deploy.sh ${BRANCH}
|
||||||
Loading…
Reference in New Issue
Block a user