generated from helmut/template
32 lines
841 B
YAML
32 lines
841 B
YAML
name: Remote Deploy to Windows
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: gitea/runner-images:ubuntu-latest
|
|
options: --user root
|
|
|
|
steps:
|
|
- name: Fix Environment
|
|
run: |
|
|
echo "HOME=/root" >> $GITHUB_ENV
|
|
echo "ACTIONS_CACHE_DIR=/tmp/cache" >> $GITHUB_ENV
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up SSH Key
|
|
run: |
|
|
mkdir -p /root/.ssh
|
|
echo "${{ secrets.SSH_PRIVATE_KEY }}" > /root/.ssh/id_ed25519
|
|
chmod 600 /root/.ssh/id_ed25519
|
|
echo "StrictHostKeyChecking no" >> /root/.ssh/config
|
|
|
|
- name: Run Ansible Playbook
|
|
run: |
|
|
cd ansible
|
|
ansible-playbook -i inventory.ini playbook.yml --private-key /root/.ssh/id_ed25519 |