Skip to content

YUGABYTE_DEPLOYMENT

YUGABYTE_DEPLOYMENT #3

Workflow file for this run

name: YUGABYTE_DEPLOYMENT
on:
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Add Host to Known Hosts
run: |
ssh-keyscan -H ${{ secrets.HOST }} >> ~/.ssh/known_hosts
- name: Deploy yugabyte db
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.USER }}@${{ secrets.HOST }} bash -c "
if sudo docker inspect -f '{{.State.Running}}' yugabyte &>/dev/null; then
sudo docker stop yugabyte && sudo docker rm yugabyte
fi
# Deploy yugabyte container with the ACL file
docker run -d --name yugabyte \
-p7000:7000 -p9000:9000 -p15433:15433 -p5433:5433 -p9042:9042 \
-v ~/yb_data:/home/yugabyte/yb_data \
-e YB_PASSWORD=${{vars.YUGABYTE_PASSWORD}} \
yugabytedb/yugabyte:latest bin/yugabyted start \
--base_dir=/home/yugabyte/yb_data \
--background=false --ysql_enable_auth=true
"