Skip to content

docs/update

docs/update #5

Workflow file for this run

name: Deploy ShieldVoucher
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
environment: production
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Deploy to Azure VM
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.AZURE_VM_HOST }}
username: ${{ secrets.AZURE_VM_USER }}
key: ${{ secrets.AZURE_VM_SSH_KEY }}
port: 22
script: |
set -e
# Clone or update the ShieldVoucher repository
cd ~/shieldvoucher || git clone https://${{ secrets.GH_TOKEN }}:x-oauth-basic@github.com/jerrygeorge360/shieldvoucher.git ~/shieldvoucher && cd ~/shieldvoucher
git pull origin main
# Write the .env securely from GitHub secrets
cat > .env << "ENVEOF"
VITE_CONTRACT_ADDRESS=${{ secrets.VITE_CONTRACT_ADDRESS }}
VITE_RPC_URL=${{ secrets.VITE_RPC_URL }}
VITE_ATLANTIC_API_KEY=${{ secrets.VITE_ATLANTIC_API_KEY }}
ENVEOF
# Restart the container
docker compose up --build -d
echo "ShieldVoucher deployment complete!"