Skip to content

Release 3.5.0

Release 3.5.0 #18

Workflow file for this run

name: Deploy app
on:
release:
types:
- published
workflow_dispatch:
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install
run: npm install
- name: Launch tests
run: npm run test
deploy:
name: Deploy app
runs-on: ubuntu-latest
needs: [tests]
steps:
- name: Checkout Ansible
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: thefirstspine/ansible
- name: Get config
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: thefirstspine/ansible-secrets
path: tmp
token: ${{ secrets.ACCESS_TOKEN }}
- name: Get inventory
run: |
rm -rf volume/conf
rm -rf volume/keys
mv tmp/conf volume/conf
mv tmp/keys volume/keys
- name: Build Docker image
run: |
docker build -t thefirstspine/ansible .
- name: Run thefirstspine/ansible image
run: |
docker run --rm -v ./volume:/volume -e BRANCH=${GITHUB_REF#refs/*/} thefirstspine/ansible ansible-playbook -i /volume/conf/inventory.yaml /volume/playbooks/deploy-website.yaml