feat: add support for base #14
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: Build and Deploy | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Docker Compose | |
uses: hoverkraft-tech/[email protected] | |
with: | |
compose-file: "./docker-compose.yaml" | |
env: | |
DATABASE_URI: ${{ secrets.DATABASE_URI }} | |
RPC_URL_OPSEPOLIA: ${{ secrets.RPC_URL_OPSEPOLIA }} | |
RPC_URL_BASE: ${{ secrets.RPC_URL_BASE }} | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up SSH key | |
run: | | |
mkdir ~/.ssh | |
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519 | |
chmod 600 ~/.ssh/id_ed25519 | |
ssh-keyscan -p 22 ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts | |
- name: Deploy | |
run: | | |
ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} /bin/bash <<'ENDSSH' | |
cd ${{ secrets.APP_PATH }} | |
git pull origin main | |
export DATABASE_URI=${{ secrets.DATABASE_URI }} | |
export RPC_URL_OPSEPOLIA=${{ secrets.RPC_URL_OPSEPOLIA }} | |
export RPC_URL_BASE=${{ secrets.RPC_URL_BASE }} | |
docker compose -f docker-compose.yaml up -d --build | |
ENDSSH |