tangled
alpha
login
or
join now
dunkirk.sh
/
dots
3
fork
atom
Kieran's opinionated (and probably slightly dumb) nix config
3
fork
atom
overview
issues
pulls
pipelines
feat: allow build step
dunkirk.sh
1 week ago
aba5b230
20751b49
verified
This commit was signed with the committer's
known signature
.
dunkirk.sh
SSH Key Fingerprint:
SHA256:DqcG0RXYExE26KiWo3VxJnsxswN1QNfTBvB+bdSpk80=
+14
-5
1 changed file
expand all
collapse all
unified
split
.github
workflows
deploy-service.yml
+14
-5
.github/workflows/deploy-service.yml
···
24
required: false
25
type: string
26
description: "SQLite DB path for pre-deploy snapshot (e.g. /var/lib/cachet/data/cachet.db)"
0
0
0
0
0
0
0
0
0
27
secrets:
28
TS_OAUTH_CLIENT_ID:
29
required: true
30
TS_OAUTH_SECRET:
31
required: true
32
-
33
-
permissions:
34
-
deployments: write
35
36
jobs:
37
deploy:
···
107
fi
108
109
echo "::group::install & restart"
110
-
ssh ${{ inputs.service }}@${{ inputs.host }} << 'INSTALL'
111
set -e
112
-
cd ~/app
113
bun install --frozen-lockfile
0
114
sudo /run/current-system/sw/bin/systemctl restart ${{ inputs.service }}.service
115
INSTALL
116
echo "::endgroup::"
···
217
fi
218
219
git reset --hard "$PREV" --quiet
0
220
bun install --frozen-lockfile 2>&1 | tail -1
0
221
sudo /run/current-system/sw/bin/systemctl restart ${{ inputs.service }}.service
222
223
echo -e "${G}:: rolled back to ${SHORT}${R}"
···
24
required: false
25
type: string
26
description: "SQLite DB path for pre-deploy snapshot (e.g. /var/lib/cachet/data/cachet.db)"
27
+
work_dir:
28
+
required: false
29
+
type: string
30
+
default: "."
31
+
description: "Subdirectory to run install/build from (relative to ~/app)"
32
+
build_command:
33
+
required: false
34
+
type: string
35
+
description: "Build command to run after install (e.g. 'bun run build')"
36
secrets:
37
TS_OAUTH_CLIENT_ID:
38
required: true
39
TS_OAUTH_SECRET:
40
required: true
0
0
0
41
42
jobs:
43
deploy:
···
113
fi
114
115
echo "::group::install & restart"
116
+
ssh ${{ inputs.service }}@${{ inputs.host }} << INSTALL
117
set -e
118
+
cd ~/app/${{ inputs.work_dir }}
119
bun install --frozen-lockfile
120
+
${{ inputs.build_command }}
121
sudo /run/current-system/sw/bin/systemctl restart ${{ inputs.service }}.service
122
INSTALL
123
echo "::endgroup::"
···
224
fi
225
226
git reset --hard "$PREV" --quiet
227
+
cd ~/app/${{ inputs.work_dir }}
228
bun install --frozen-lockfile 2>&1 | tail -1
229
+
${{ inputs.build_command }}
230
sudo /run/current-system/sw/bin/systemctl restart ${{ inputs.service }}.service
231
232
echo -e "${G}:: rolled back to ${SHORT}${R}"