Files
Wordpress-Ansible/.gitea/workflows/yamllint.yml
sotos c8f490d8aa
Some checks failed
CI/CD Pipeline / lint (push) Has been cancelled
CI/CD Pipeline / deploy (push) Failing after 39s
Update
2025-12-17 08:54:14 +01:00

52 lines
1.3 KiB
YAML

---
name: CI/CD Pipeline
on:
push:
branches: [main, flip_dev]
jobs:
lint:
runs-on: docker
container:
image: node:20-bullseye
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Python & linters
run: |
apt-get update && apt-get install -y python3 python3-pip bash git
pip3 install --upgrade pip
pip3 install yamllint ansible-lint
- name: Run linters
run: |
yamllint .
deploy:
runs-on: docker
container:
image: node:20-bullseye
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Ansible & dependencies
run: |
apt-get update && apt-get install -y python3 python3-pip openssh-client bash git
pip3 install --upgrade pip
pip3 install ansible
- name: Setup SSH key with passphrase
run: |
echo " Checking SSH key setup..."
head -5 ~/.ssh/id_rsa | cat -v
echo " Testing SSH connection..."
ssh -i ~/.ssh/id_rsa root@213.95.90.157 'echo SSH connection successful'
echo " Running Ansible Playbook..."
- name: Run Ansible deployment
run: |
ansible-playbook -i ansible/inventory.yaml site.yaml