Bump frontend submodule to 8d4a96c (light mode panel fixes). #97
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: CI/CD — Build & Deploy | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout with submodules | |
| uses: actions/checkout@v4.2.2 | |
| with: | |
| submodules: recursive | |
| token: ${{ secrets.GH_PAT }} | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3.4.0 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Build and push backend | |
| uses: docker/build-push-action@v6.16.0 | |
| with: | |
| context: ./backend | |
| push: true | |
| tags: cuongnguyen146/transpachain-backend:latest | |
| - name: Build and push frontend | |
| uses: docker/build-push-action@v6.16.0 | |
| with: | |
| context: ./frontend | |
| push: true | |
| tags: cuongnguyen146/transpachain-frontend:latest | |
| build-args: | | |
| NEXT_PUBLIC_ALCHEMY_KEY=${{ secrets.NEXT_PUBLIC_ALCHEMY_KEY }} | |
| NEXT_PUBLIC_CHARITY_CORE_ADDRESS=${{ secrets.NEXT_PUBLIC_CHARITY_CORE_ADDRESS }} | |
| NEXT_PUBLIC_DONATION_VAULT_ADDRESS=${{ secrets.NEXT_PUBLIC_DONATION_VAULT_ADDRESS }} | |
| NEXT_PUBLIC_GOVERNANCE_DAO_ADDRESS=${{ secrets.NEXT_PUBLIC_GOVERNANCE_DAO_ADDRESS }} | |
| NEXT_PUBLIC_IMPACT_NFT_ADDRESS=${{ secrets.NEXT_PUBLIC_IMPACT_NFT_ADDRESS }} | |
| NEXT_PUBLIC_USDC_ADDRESS=${{ secrets.NEXT_PUBLIC_USDC_ADDRESS }} | |
| - name: Deploy to AWS EC2 | |
| uses: appleboy/ssh-action@v1.2.2 | |
| with: | |
| host: ${{ secrets.EC2_HOST }} | |
| username: ubuntu | |
| key: ${{ secrets.EC2_SSH_KEY }} | |
| script: | | |
| cd ~/transpachain | |
| docker compose pull | |
| docker compose up -d | |
| docker image prune -f | |
| echo "Deploy complete!" |