This commit is contained in:
@@ -30,6 +30,7 @@ jobs:
|
|||||||
#shell: bash
|
#shell: bash
|
||||||
run: |
|
run: |
|
||||||
eval "$(ssh-agent -s)"
|
eval "$(ssh-agent -s)"
|
||||||
|
mkdir ~/.ssh
|
||||||
echo "$SSH_KEY" >> ~/.ssh/id_rsa
|
echo "$SSH_KEY" >> ~/.ssh/id_rsa
|
||||||
chmod 400 ~/.ssh/id_rsa
|
chmod 400 ~/.ssh/id_rsa
|
||||||
ssh-add ~/.ssh/id_rsa
|
ssh-add ~/.ssh/id_rsa
|
||||||
@@ -38,7 +39,7 @@ jobs:
|
|||||||
# 3. Trust the Gitea host key (port 222)
|
# 3. Trust the Gitea host key (port 222)
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
- name: Trust Gitea host key
|
- name: Trust Gitea host key
|
||||||
shell: bash
|
#shell: bash
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
ssh-keyscan -H gitea 2>/dev/null >> ~/.ssh/known_hosts
|
ssh-keyscan -H gitea 2>/dev/null >> ~/.ssh/known_hosts
|
||||||
@@ -47,7 +48,7 @@ jobs:
|
|||||||
# 4. Clone the template repo via SSH (uses detected IP + port 222)
|
# 4. Clone the template repo via SSH (uses detected IP + port 222)
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
- name: Clone template repo
|
- name: Clone template repo
|
||||||
shell: bash
|
#shell: bash
|
||||||
run: |
|
run: |
|
||||||
git clone ssh://git@gitea/lepton/app_templates /tmp/template
|
git clone ssh://git@gitea/lepton/app_templates /tmp/template
|
||||||
|
|
||||||
@@ -55,7 +56,7 @@ jobs:
|
|||||||
# 5. Copy Docker artefacts into workspace root
|
# 5. Copy Docker artefacts into workspace root
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
- name: Copy Docker configuration
|
- name: Copy Docker configuration
|
||||||
shell: bash
|
#shell: bash
|
||||||
run: |
|
run: |
|
||||||
cp /tmp/template/web/docker-compose.yml ./website/docker-compose.yml
|
cp /tmp/template/web/docker-compose.yml ./website/docker-compose.yml
|
||||||
cp /tmp/template/web/Dockerfile ./website/Dockerfile
|
cp /tmp/template/web/Dockerfile ./website/Dockerfile
|
||||||
@@ -64,13 +65,13 @@ jobs:
|
|||||||
# 6. Stop any old stack, rebuild, and run the new one
|
# 6. Stop any old stack, rebuild, and run the new one
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
- name: Stop existing stack (ignore if none)
|
- name: Stop existing stack (ignore if none)
|
||||||
shell: bash
|
#shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd ./website
|
cd ./website
|
||||||
docker compose down --remove-orphans || true
|
docker compose down --remove-orphans || true
|
||||||
|
|
||||||
- name: Rebuild & deploy
|
- name: Rebuild & deploy
|
||||||
shell: bash
|
#shell: bash
|
||||||
working-directory: website
|
working-directory: website
|
||||||
run: |
|
run: |
|
||||||
docker compose build --no-cache
|
docker compose build --no-cache
|
||||||
|
Reference in New Issue
Block a user