-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (30 loc) · 965 Bytes
/
build_deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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 }}