File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # See https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/
2+
3+ name : Fly Deploy
4+ on :
5+ push :
6+ branches :
7+ - main
8+ jobs :
9+ deploy :
10+ name : Deploy app
11+ runs-on : ubuntu-latest
12+ concurrency : deploy-group # optional: ensure only one action runs at a time
13+ steps :
14+ - uses : actions/checkout@v4
15+ - uses : superfly/flyctl-actions/setup-flyctl@master
16+ - run : flyctl deploy --remote-only
17+ env :
18+ FLY_API_TOKEN : ${{ secrets.FLY_API_TOKEN }}
Original file line number Diff line number Diff line change 11import { Bot , Context } from "grammy" ;
22import dotenv from "dotenv" ;
33import { dailyQuote , loadInitialQuote } from "./getQuoteFunc" ;
4+ import http from "http" ;
45
56dotenv . config ( ) ;
67
@@ -106,3 +107,17 @@ async function main() {
106107}
107108
108109main ( ) . catch ( console . error ) ;
110+
111+ http
112+ . createServer ( ( req , res ) => {
113+ if ( req . url === "/ping" ) {
114+ res . writeHead ( 200 , { "Content-Type" : "text/plain" } ) ;
115+ res . end ( "pong" ) ;
116+ } else {
117+ res . writeHead ( 404 ) ;
118+ res . end ( ) ;
119+ }
120+ } )
121+ . listen ( process . env . PORT || 8080 , ( ) => {
122+ console . log ( "Ping server is running" ) ;
123+ } ) ;
Original file line number Diff line number Diff line change 1- # fly.toml app configuration file generated for randomquotes on 2025-07-29T15:47:39Z
1+ # fly.toml app configuration file generated for randomquotes-white-darkness-8812 on 2025-07-29T20:44:14+03:00
22#
33# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
44#
55
6- app = ' randomquotes'
6+ app = ' randomquotes-white-darkness-8812 '
77primary_region = ' waw'
88
99[build ]
@@ -23,4 +23,3 @@ primary_region = 'waw'
2323 memory = ' 1gb'
2424 cpu_kind = ' shared'
2525 cpus = 1
26- memory_mb = 1024
Original file line number Diff line number Diff line change 1313 },
1414 "scripts" : {
1515 "lint" : " biome check ." ,
16- "lint:fix" : " biome check . --apply"
16+ "lint:fix" : " biome check . --apply" ,
17+ "start" : " node bot.js"
1718 }
1819}
You can’t perform that action at this time.
0 commit comments