Skip to content

Ansible test

Ansible test #61

Workflow file for this run

name: Deploy Site
on:
# Runs on pushes targeting the default branch
push:
branches: ['main']
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
deploy:
environment:
name: Staging
runs-on: ubuntu-latest
steps:
- name: Install Ansible
shell: bash
run: |
sudo apt update
sudo apt install -y ansible
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm install
- name: Build app
run: npm run build
- name: Run playbook
uses: dawidd6/action-ansible-playbook@v2
with:
playbook: playbook.yml
directory: .playbook/
key: ${{secrets.SSH_KEY}}
options: |
--inventory inventory
--extra-vars repositoryPath=$GITHUB_WORKSPACE