Skip to content

change deploy

change deploy #2

Workflow file for this run

name: odin-battleship-fly
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Login to docker hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build the image and push it to Docker Hub
uses: docker/build-push-action@v5
with:
push: true
tags: mantesso/odin-battleship:ex_3.2
deploy:
name: odin-battleship-fly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only --dockerfile Dockerfile.node # using the Dockerfile.node here because deployment on Fly did not work with nginx image
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}