Fix formatting of environment variable declarations in deploy.yml #7
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 and Build on Server | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy via SSH and Build | |
| uses: appleboy/ssh-action@master | |
| env: | |
| MCPO_API_KEY: ${{ secrets.MCPO_API_KEY }} | |
| NODE_URL: ${{ secrets.NODE_URL }} | |
| GRAPH_SMART_CONTRACT_ADDRESS: ${{ secrets.GRAPH_SMART_CONTRACT_ADDRESS }} | |
| with: | |
| host: ${{ secrets.HOST }} | |
| port: ${{ secrets.PORT }} | |
| username: ${{ secrets.USERNAME }} | |
| key: ${{ secrets.KEY }} | |
| script: | | |
| set -e | |
| sudo -i <<EOF | |
| echo "Navigating to project directory..." | |
| cd /root/mcp-cw-graph | |
| echo "Pulling latest code from main..." | |
| git pull origin main | |
| echo "Building Docker image..." | |
| docker build -t cw-social-mcp . | |
| echo "Stopping and removing existing 'cw_social_mcp' container if it exists..." | |
| docker rm -f cw_social_mcp || true | |
| echo "Starting new 'cw_social_mcp' container..." | |
| docker run \ | |
| --name cw_social_mcp \ | |
| -v $(pwd)/hf-cache:/app/hf-cache \ | |
| -e NODE_URL=${{ secrets.NODE_URL }}\ | |
| -e CONTRACT_ADDRESS=${{ secrets.GRAPH_SMART_CONTRACT_ADDRESS }}\ | |
| -p 8000:8000 \ | |
| cw-social-mcp | |
| echo "Deployment complete." | |
| EOF |