update cicd #46
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 to server | |
on: | |
push: | |
branches: [ dev ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
- name: Netbird Connect | |
id: netbird | |
uses: Alemiz112/netbird-connect@v1 | |
with: | |
setup-key: ${{ secrets.NETBIRD_SETUP_KEY }} | |
management-url: 'https://api.netbird.io' | |
- name: Deploy | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
username: ${{ secrets.SSH_USER }} | |
password: ${{ secrets.SSH_PASSWORD }} | |
script: | | |
cd ura | |
git fetch | |
git pull | |
docker compose down | |
docker compose up -d --build |