Replace pymongo with Mongo Engine (#57) #63
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: Prod Deploy | |
on: | |
push: | |
branches: main | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Checkout project from git | |
uses: actions/checkout@v3 | |
with: | |
repository: dragid10/dnd-bot.git | |
ref: main | |
- uses: superfly/flyctl-actions/setup-flyctl@master | |
- run: flyctl auth docker && docker login registry.fly.io | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
- name: Login to Flyctl registry | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v3 | |
with: | |
push: true | |
platforms: linux/amd64,linux/arm64 | |
tags: registry.fly.io/dnd-bot:latest,registry.fly.io/dnd-bot:production | |
provenance: false | |
build-args: | | |
BUILDKIT_CONTEXT_KEEP_GIT_DIR=true | |
deploy: | |
name: Deploy dnd-bot | |
runs-on: ubuntu-latest | |
steps: | |
# This step checks out a copy of your repository. | |
- name: Checkout project from git | |
uses: actions/checkout@v3 | |
with: | |
repository: dragid10/dnd-bot.git | |
ref: main | |
- uses: superfly/flyctl-actions/setup-flyctl@master | |
- run: flyctl deploy --app dnd-bot --now | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
needs: docker |