File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed
Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ This action wraps the flyctl CLI tool to allow deploying and managing fly apps.
44
55## Usage
66
7+ ### Deploy
8+
79``` yaml
810name : Deploy to Fly
911on : [push]
@@ -14,14 +16,32 @@ jobs:
1416 steps :
1517 # This step checks out a copy of your repository.
1618 - uses : actions/checkout@v2
17- # This step runs `flyctl deploy`.
1819 - uses : superfly/flyctl-actions@master
1920 env :
2021 FLY_API_TOKEN : ${{ secrets.FLY_API_TOKEN }}
2122 with :
2223 args : " deploy"
2324` ` `
2425
26+
27+ ### Run one off scripts
28+
29+ ` ` ` yaml
30+ name : Run on Fly
31+ on : [push]
32+ jobs :
33+ deploy :
34+ name : Run script
35+ runs-on : ubuntu-latest
36+ steps :
37+ - uses : actions/checkout@v2
38+ - uses : superfly/flyctl-actions@master
39+ env :
40+ FLY_API_TOKEN : ${{ secrets.FLY_API_TOKEN }}
41+ with :
42+ args : " ssh console --command 'sh ./myscript.sh'"
43+ ` ` `
44+
2545See the [flyctl](https://github.com/superfly/flyctl) GitHub project for more information on using ` flyctl`.
2646
2747# # Secrets
Original file line number Diff line number Diff line change @@ -17,6 +17,11 @@ for i in "$@" ; do
1717 fi
1818done
1919
20+ if [[ $1 != " deploy" ]] ; then
21+ # Strategy only relevant to deployments so strip if not a deploy
22+ STRATEGY=" "
23+ fi
24+
2025sh -c " flyctl $* $STRATEGY "
2126
2227ACTUAL_EXIT=" $? "
You can’t perform that action at this time.
0 commit comments