File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Production
2
+ on :
3
+ push :
4
+ branches : [ main ]
5
+ workflow_dispatch :
6
+
7
+ jobs :
8
+ deploy :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - name : Deploy to production environment
12
+
13
+ env :
14
+ SHA : ${{ github.sha }}
15
+ VITE_BUILD : ${{ github.sha }}
16
+ HONEYBADGER_API_KEY : ${{ secrets.HONEYBADGER_KEY }}
17
+ with :
18
+ host : 157.180.48.235
19
+ username : deploy_gh_publisher_services
20
+ key : ${{ secrets.PRODUCTION_HETZNER_SSH_KEY }}
21
+ envs : SHA,VITE_BUILD,HONEYBADGER_API_KEY
22
+ script : |
23
+ cd /var/www/publisher-services
24
+ git fetch
25
+ git reset --hard $SHA
26
+
27
+ # Bootstrap client
28
+ cd client
29
+ pnpm install
30
+ cd ..
31
+
32
+ # Build server
33
+ cd server
34
+ export MIX_HOME=$PWD/.nix-mix
35
+ export HEX_HOME=$PWD/.nix-hex
36
+ mix local.hex --force
37
+ mix local.rebar --force
38
+ mix deps.get --only prod
39
+ MIX_ENV=prod mix release --overwrite
40
+ cd ..
41
+
42
+ # Build client
43
+ cd client
44
+ pnpm build
45
+ cd ..
You can’t perform that action at this time.
0 commit comments