Fix deployment #17
This file contains 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 Nodes | |
on: | |
push: | |
branches: | |
- main | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
deploy: | |
concurrency: main | |
runs-on: ubuntu-latest | |
steps: | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: xmtpeng | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: Git Checkout | |
uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: ".nvmrc" | |
cache: "yarn" | |
- name: Install Yarn v3 | |
run: | | |
corepack enable | |
corepack prepare [email protected] --activate | |
- run: yarn | |
- run: yarn build | |
- name: Push | |
id: push | |
run: | | |
export DOCKER_IMAGE_TAG=latest | |
IMAGE_TO_DEPLOY=xmtp/bot-examples@$(dev/docker/push-examples) | |
echo Successfully pushed $IMAGE_TO_DEPLOY | |
echo "docker_image=${IMAGE_TO_DEPLOY}" >> $GITHUB_OUTPUT | |
- name: Deploy (dev) | |
uses: xmtp-labs/terraform-deployer@v1 | |
with: | |
terraform-token: ${{ secrets.TERRAFORM_TOKEN }} | |
terraform-org: xmtp | |
terraform-workspace: dev | |
variable-name: bot_examples_docker_image | |
variable-value: ${{ steps.push.outputs.docker_image }} | |
variable-value-required-prefix: "xmtp/bot-examples@sha256:" | |
# - name: Deploy (production) | |
# uses: xmtp-labs/terraform-deployer@v1 | |
# with: | |
# terraform-token: ${{ secrets.TERRAFORM_TOKEN }} | |
# terraform-org: xmtp | |
# terraform-workspace: production | |
# variable-name: bot_examples_image | |
# variable-value: ${{ steps.push.outputs.docker_image }} | |
# variable-value-required-prefix: "xmtp/bot-examples@sha256:" |