File tree Expand file tree Collapse file tree 3 files changed +32
-1
lines changed
frontend/src/routes/posts Expand file tree Collapse file tree 3 files changed +32
-1
lines changed Original file line number Diff line number Diff line change 9
9
- main
10
10
11
11
jobs :
12
+ setup :
13
+ name : Deploy Setup
14
+ runs-on : ubuntu-latest
15
+ outputs :
16
+ frontend-changed : ${{ steps.changes.outputs.frontend-changed }}
17
+ data-changed : ${{ steps.changes.outputs.data-changed }}
18
+ steps :
19
+ - name : Checkout
20
+
21
+
22
+ - name : Detect Changes
23
+ id : changes
24
+ run : |
25
+ FRONTEND_DIFF=$(git diff --name-only origin/main -- frontend/* | wc -l | xargs)
26
+ DATA_DIFF=$(git diff --name-only origin/main -- data/* | wc -l | xargs)
27
+
28
+ if [[ "$FRONTEND_DIFF" == "1" ]]; then
29
+ echo "frontend-changed=true" >> $GITHUB_OUTPUT
30
+ fi
31
+
32
+ if [[ "$DATA_DIFF" == "1" ]]; then
33
+ echo "data-changed=true" >> $GITHUB_OUTPUT
34
+ fi
35
+
36
+
12
37
build-frontend :
13
38
name : Build Frontend
39
+ if : ${{ needs.setup.outputs.frontend-changed == 'true' }}
40
+ needs : [setup]
14
41
runs-on : ubuntu-latest
15
42
steps :
16
43
- name : Checkout
31
58
32
59
deploy-frontend :
33
60
name : Deploy Frontend
61
+ if : ${{ needs.setup.outputs.frontend-changed == 'true' }}
62
+ needs : [setup]
34
63
runs-on : ubuntu-latest
35
64
needs : build-frontend
36
65
permissions :
47
76
48
77
build-data :
49
78
name : Build Data
79
+ if : ${{ needs.setup.outputs.data-changed == 'true' }}
80
+ needs : [setup]
50
81
runs-on : ubuntu-latest
51
82
steps :
52
83
- name : Checkout
Original file line number Diff line number Diff line change @@ -3,5 +3,4 @@ import { getPosts } from '$lib/utils/loader.js';
3
3
4
4
export const load = ( { fetch} ) => {
5
5
return getPosts ( fetch ) ;
6
-
7
6
}
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ stdenv.mkDerivation {
4
4
name = "node" ;
5
5
buildInputs = [
6
6
nodejs
7
+ actionlint
7
8
] ;
8
9
shellHook = ''
9
10
export PATH="$PWD/frontend/node_modules/.bin/:$PATH"
You can’t perform that action at this time.
0 commit comments