testing actions
Some checks failed
Deploy to App Container / build-and-deploy (push) Failing after 5s
Some checks failed
Deploy to App Container / build-and-deploy (push) Failing after 5s
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
name: test
|
name: Deploy to App Container
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -6,9 +6,33 @@ on:
|
|||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
hello:
|
build-and-deploy:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Say hello
|
- name: Deploy via SSH
|
||||||
run: echo "hiiiiillo"
|
run: |
|
||||||
|
ssh -o StrictHostKeyChecking=no -i /opt/gitea-runner/id_ed25519 ci@192.168.1.243 << 'EOF'
|
||||||
|
APP_DIR=/home/ci/app
|
||||||
|
|
||||||
|
# Remove old repo
|
||||||
|
if [ -d "$APP_DIR" ]; then
|
||||||
|
echo "Deleting existing repo..."
|
||||||
|
rm -rf "$APP_DIR"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Clone latest code
|
||||||
|
echo "Cloning latest code..."
|
||||||
|
git clone git@192.168.1.133:3000/gibby/go-htmx-local.git "$APP_DIR"
|
||||||
|
cd "$APP_DIR"
|
||||||
|
|
||||||
|
# Optional: pull submodules if you use them
|
||||||
|
# git submodule update --init --recursive
|
||||||
|
|
||||||
|
# Stop any running containers
|
||||||
|
echo "Stopping old container..."
|
||||||
|
make docker-down || true
|
||||||
|
|
||||||
|
# Build & start new container
|
||||||
|
echo "Starting new container..."
|
||||||
|
make docker-run
|
||||||
|
EOF
|
||||||
|
|||||||
Reference in New Issue
Block a user