pandorabox.io/.github/workflows/deployment.yml

27 lines
693 B
YAML
Raw Normal View History

2021-12-01 22:50:29 -08:00
name: deploy
2020-09-02 03:15:44 -07:00
on:
push:
branches:
- master
jobs:
build:
2021-12-01 22:50:29 -08:00
runs-on: ubuntu-20.04
timeout-minutes: 10
2020-09-02 03:15:44 -07:00
steps:
2022-03-01 12:47:06 -08:00
- uses: actions/checkout@v3
2021-12-01 22:50:29 -08:00
- name: Prepare environment
2020-09-02 03:15:44 -07:00
run: |
2021-12-01 22:50:29 -08:00
id
2020-09-02 03:15:44 -07:00
eval $(ssh-agent -s)
mkdir -p ~/.ssh
2021-12-01 22:50:29 -08:00
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
ssh-keyscan akheron.rudin.io >> ~/.ssh/known_hosts
chmod -R 700 ~/.ssh
ansible-galaxy collection install community.general
2022-08-20 03:28:05 -07:00
echo "${{ secrets.VAULT_PASS }}" > ~/.vault_pass.txt
2021-12-01 22:50:29 -08:00
- name: Run ansible
run: |
2022-08-20 03:28:05 -07:00
ansible-playbook -i hosts --vault-password-file ~/.vault_pass.txt --private-key ~/.ssh/id_rsa deploy.yml