plh97 deploy ScienceOS π #4
This file contains hidden or 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: GitHub Actions CICD | |
| run-name: ${{ github.actor }} deploy ScienceOS π | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| jobs: | |
| Ansible-Actions: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@v3 | |
| - name: Install SSH Key | |
| uses: shimataro/ssh-key-action@v2 | |
| with: | |
| key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| name: qwe.pem # Write the key to /home/runner/.ssh/qwe.pem | |
| known_hosts: "just-a-placeholder-so-we-dont-get-errors" | |
| config: | | |
| Host vultr | |
| HostName ${{ secrets.SSH_HOST }} | |
| CheckHostIP no | |
| Port 22 | |
| User root | |
| - name: Adding Known Hosts | |
| run: ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts | |
| - name: run ansible | |
| run: | | |
| cd ansible && ansible-playbook cicd-vultr.yml |