@@ -21,96 +21,33 @@ jobs:
21
21
runs-on : ubuntu-latest
22
22
steps :
23
23
- name : ⬇️ Checkout repo
24
- uses : actions/checkout@v3
24
+ uses : actions/checkout@v4
25
25
26
26
- name : ⎔ Setup node
27
- uses : actions/setup-node@v3
27
+ uses : actions/setup-node@v4
28
28
with :
29
- node-version : 16
29
+ node-version : 20
30
30
31
31
- name : 📥 Install deps
32
32
uses : bahmutov/npm-install@v1
33
33
34
34
- name : ⚡ Run vitest
35
35
run : npm run test -- --coverage
36
36
37
- build :
38
- if : github.repository == 'remix-run/remix-website'
39
- name : 🐳 Build
40
- runs-on : ubuntu-latest
41
- steps :
42
- - name : ⬇️ Checkout repo
43
- uses : actions/checkout@v3
44
-
45
- - name : 👀 Read app name
46
-
47
- id : app_name
48
- with :
49
- file : " fly.production.toml"
50
- field : " app"
51
-
52
- - name : 🐳 Set up Docker Buildx
53
- uses : docker/setup-buildx-action@v2
54
-
55
- # Setup cache
56
- - name : ⚡️ Cache Docker layers
57
- uses : actions/cache@v3
58
- with :
59
- path : /tmp/.buildx-cache
60
- key : ${{ runner.os }}-buildx-${{ github.sha }}
61
- restore-keys : |
62
- ${{ runner.os }}-buildx-
63
- - name : 🔑 Fly Registry Auth
64
- uses : docker/login-action@v2
65
- with :
66
- registry : registry.fly.io
67
- username : x
68
- password : ${{ secrets.FLY_API_TOKEN }}
69
-
70
- - name : 🐳 Docker build
71
- uses : docker/build-push-action@v4
72
- with :
73
- context : .
74
- push : true
75
- tags : registry.fly.io/${{ steps.app_name.outputs.value }}:${{ github.ref_name }}-${{ github.sha }}
76
- build-args : |
77
- COMMIT_SHA=${{ github.sha }}
78
- cache-from : type=local,src=/tmp/.buildx-cache
79
- cache-to : type=local,mode=max,dest=/tmp/.buildx-cache-new
80
-
81
- # This ugly bit is necessary if you don't want your cache to grow forever
82
- # till it hits GitHub's limit of 5GB.
83
- # Temp fix
84
- # https://github.com/docker/build-push-action/issues/252
85
- # https://github.com/moby/buildkit/issues/1896
86
- - name : 🚚 Move cache
87
- run : |
88
- rm -rf /tmp/.buildx-cache
89
- mv /tmp/.buildx-cache-new /tmp/.buildx-cache
90
37
deploy :
91
38
name : 🚀 Deploy
92
39
runs-on : ubuntu-latest
93
- needs : [test, build ]
40
+ needs : [test]
94
41
steps :
95
42
- name : ⬇️ Checkout repo
96
- uses : actions/checkout@v3
97
-
98
- - name : 👀 Read app name
99
-
100
- id : app_name
101
- with :
102
- file : " fly.production.toml"
103
- field : " app"
43
+ uses : actions/checkout@v4
44
+
45
+ - name : 🎈 Setup Fly
46
+ uses :
superfly/flyctl-actions/[email protected]
104
47
105
48
- name : 🚀 Deploy Production
106
49
if : ${{ github.ref == 'refs/heads/main' }}
107
-
108
- with :
109
- args : |
110
- deploy --config ./fly.production.toml \
111
- --build-arg SOURCE_REPO="remix-run/remix" \
112
- --build-arg RELEASE_PACKAGE="remix" \
113
- --strategy rolling
50
+ run : flyctl deploy --remote-only --config ./fly.production.toml --build-arg SOURCE_REPO="remix-run/remix" --build-arg RELEASE_PACKAGE="remix" --strategy rolling
114
51
env :
115
52
FLY_API_TOKEN : ${{ secrets.FLY_API_TOKEN }}
116
53
0 commit comments