This repository has been archived by the owner on Sep 14, 2024. It is now read-only.
deploy #31
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deploy | |
on: | |
workflow_dispatch: | |
permissions: | |
contents: read # for checkout | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # to be able to publish a GitHub release | |
issues: write # to be able to comment on released issues | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- name: Use Node.js 20 | |
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4 | |
with: | |
node-version: "20.x" | |
- name: Install dependencies | |
run: npm install conventional-changelog-conventionalcommits | |
- name: Release new version | |
run: npx semantic-release | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
ansible: | |
needs: release | |
runs-on: ubuntu-latest | |
environment: production | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- name: Run playbook | |
uses: dawidd6/action-ansible-playbook@c97d71562fcba83cc1ea0602d5a77013427f7571 # v2 | |
with: | |
playbook: main.yml | |
key: ${{secrets.SSH_PRIVATE_KEY}} | |
vault_password: ${{secrets.VAULT_PASSWORD}} | |
requirements: requirements.yml | |
options: | | |
--inventory hosts |