Skip to content

Fixed connection definitions and loading component #88

Fixed connection definitions and loading component

Fixed connection definitions and loading component #88

Workflow file for this run

name: Build and Deploy Dev
env:
SERVER_USER: 'w3reg'
SERVER_IP: '135.181.202.179'
DEPLOY_PATH: '/home/w3reg/dev.w3reg.org'
BUILD_TARGET: 'production'
on:
pull_request:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Bun
uses: oven-sh/setup-bun@v1
- name: Build the Vite app
run: |
cat .env.example | grep -v "#" > .env
bash scripts/build.sh
- name: Set up SSH agent
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Add SSH Key to Known Hosts
run: |
echo "$(ssh-keyscan -t rsa ${{ env.SERVER_IP }} 2>/dev/null)" >> ~/.ssh/known_hosts
- name: Deploy to server
run: |
ssh ${{ env.SERVER_USER }}@${{ env.SERVER_IP }} << EOF
set -euo pipefail
rm -fr ${{ env.DEPLOY_PATH }}/w3registrar-www/nginx || true
mkdir -p ${{ env.DEPLOY_PATH }}/w3registrar-www
cd ${{ env.DEPLOY_PATH }}/w3registrar-www
EOF
scp -r ./nginx ${{ env.SERVER_USER }}@${{ env.SERVER_IP }}:${{ env.DEPLOY_PATH }}/w3registrar-www/
scp -r ./dist ${{ env.SERVER_USER }}@${{ env.SERVER_IP }}:${{ env.DEPLOY_PATH }}/w3registrar-www/nginx/
scp docker-compose.yaml ${{ env.SERVER_USER }}@${{ env.SERVER_IP }}:${{ env.DEPLOY_PATH }}/w3registrar-www/
ssh ${{ env.SERVER_USER }}@${{ env.SERVER_IP }} << EOF
set -euo pipefail
cd ${{ env.DEPLOY_PATH }}/w3registrar-www
docker compose up --build -d web-nginx
EOF