This repository was archived by the owner on Feb 12, 2026. It is now read-only.
Set grafana user/pw #163
This file contains hidden or 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 | |
| on: | |
| push: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| env: | |
| DEPLOY_PATH: /opt/btc_vault | |
| concurrency: | |
| group: deploy-production | |
| cancel-in-progress: false | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: SSH agent | |
| uses: webfactory/ssh-agent@v0.9.0 | |
| with: | |
| ssh-private-key: ${{ secrets.DEPLOY_SSH_KEY }} | |
| - name: Trust server host key | |
| run: | | |
| mkdir -p ~/.ssh | |
| ssh-keyscan -H ${{ vars.DEPLOY_HOST }} >> ~/.ssh/known_hosts | |
| - name: Rsync repo to server | |
| run: | | |
| rsync -az --delete \ | |
| --exclude '.git' \ | |
| --exclude 'node_modules' \ | |
| --exclude 'target' \ | |
| --exclude '.dfx' \ | |
| --exclude '.pnpm-store' \ | |
| --exclude '.config' \ | |
| --exclude 'src/declarations' \ | |
| --exclude 'src/btc_vault_frontend_v2/declarations' \ | |
| --exclude 'src/btc_vault_frontend_v2/dist' \ | |
| --exclude '**/out' \ | |
| --exclude '**/cache' \ | |
| --exclude '**/broadcast' \ | |
| --exclude '**/lib' \ | |
| ./ ${{ vars.DEPLOY_USER }}@${{ vars.DEPLOY_HOST }}:${{ env.DEPLOY_PATH }}/ | |
| - name: Create/overwrite .env from secret | |
| run: | | |
| ssh ${{ vars.DEPLOY_USER }}@${{ vars.DEPLOY_HOST }} "cat > ${DEPLOY_PATH}/.env <<'EOF' | |
| ${{ secrets.ENV_FILE }} | |
| EOF" | |
| - name: Pull and restart services | |
| run: | | |
| ssh ${{ vars.DEPLOY_USER }}@${{ vars.DEPLOY_HOST }} "cd ${DEPLOY_PATH} && docker compose pull && docker compose up -d --build" |