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