Merge pull request #4 from Tulip-Tech/quick-update #27
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: KBOVisions Deployment | |
on: | |
push: | |
branches: 'main' | |
jobs: | |
push_event: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
with: | |
ref: main | |
- name: Install OpenVPN | |
run: | | |
sudo apt update | |
sudo apt install -y openvpn openvpn-systemd-resolved | |
ls -ltrh openvpn | |
- name: Connect to VPN | |
uses: 'kota65535/github-openvpn-connect-action@v2' | |
with: | |
config_file: openvpn/client.ovpn | |
username: ${{ secrets.OVPN_USERNAME }} | |
password: ${{ secrets.OVPN_PASSWORD }} | |
client_key: ${{ secrets.OVPN_CLIENT_KEY }} | |
- name: Deploy | |
uses: appleboy/ssh-action@master | |
with: | |
host: 10.217.131.23 | |
port: 22 | |
username: ec2-user | |
key: ${{ secrets.SSH_KEY }} | |
script: | | |
./amar-fe.sh | |
- name: google-chat-notification | |
# You may pin to the exact commit or the version. | |
# uses: Co-qn/google-chat-notification@b9227d9daa4638c9782a5bd16c4abb86268127a1 | |
uses: Co-qn/google-chat-notification@v1 | |
with: | |
# job name. | |
name: Deploy | |
# google chat webhook url. | |
url: https://chat.googleapis.com/v1/spaces/AAAAHF1iHEM/messages?key=AIzaSyDdI0hCZtE6vySjMm-WEfRq3CPzqKqqsHI&token=wCO_dPF1xP0S-rk7GCzkw6EWBdH4B872G63lLVPw1bo%3D | |
# job status. | |
status: ${{ job.status }} | |
if: always() |