Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
build:
name: build
runs-on: [self-hosted, pljudfbee1]
# Use staging environment for dev branch (gets variables from GitHub)
environment: ${{ github.ref == 'refs/heads/dev' && 'staging' || '' }}

steps:
- name: checkout
Expand All @@ -32,6 +34,17 @@ jobs:
- name: build docker image
run: docker build --build-arg VERSION=${{ steps.version.outputs.version }} -t swarm_connect:$GITHUB_REF_NAME .

- name: write env file for dev
if: github.ref == 'refs/heads/dev'
run: |
cat > /opt/swarm_connect_dev.env << 'EOF'
X402_ENABLED=${{ vars.X402_ENABLED || 'false' }}
X402_PAY_TO_ADDRESS=${{ vars.X402_PAY_TO_ADDRESS || '' }}
X402_NETWORK=${{ vars.X402_NETWORK || 'base-sepolia' }}
X402_FACILITATOR_URL=${{ vars.X402_FACILITATOR_URL || 'https://x402.org/facilitator' }}
X402_FREE_TIER_ENABLED=${{ vars.X402_FREE_TIER_ENABLED || 'true' }}
EOF

- name: deploy
run: >
cd /opt/ && rm -rf swarm_connect && git clone -b $GITHUB_REF_NAME https://github.com/datafund/swarm_connect.git && cd swarm_connect && docker compose up -d
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ services:
image: swarm_connect:dev
ports:
- "8900:8000"
env_file:
- /opt/swarm_connect_dev.env
environment:
- SWARM_BEE_API_URL=http://192.168.45.30:1633
restart: unless-stopped
Expand Down