-
Notifications
You must be signed in to change notification settings - Fork 19
133 lines (109 loc) · 3.95 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: CI
on: push
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: 🔧 Install java
uses: actions/setup-java@v1
with:
java-version: '11.0.7'
- name: 🔧 Install clojure
uses: DeLaGuardo/setup-clojure@9.0
with:
cli: '1.10.3.943'
- name: 🛎 Checkout
uses: actions/checkout@v2
- name: 🧶 Yarn Install
run: yarn install
- name: 🧪 Run CLJS tests
run: yarn test
- name: 🧪 Run squint tests
run: |
yarn squint compile
node dist/nextjournal/clojure_mode_tests.mjs
squint:
name: Static App / Squint Build
runs-on: ubuntu-latest
steps:
- name: 🛎 Checkout
uses: actions/checkout@v2
- name: 🔐 Google Auth
uses: google-github-actions/auth@v0
with:
credentials_json: ${{ secrets.GCLOUD_SERVICE_KEY }}
- name: 🔧 Setup Google Cloud SDK
uses: google-github-actions/setup-gcloud@v0.3.0
- name: 🔧 Install java
uses: actions/setup-java@v1
with:
java-version: '11.0.7'
- name: 🔧 Install clojure
uses: DeLaGuardo/setup-clojure@master
with:
bb: 'latest'
- name: 🔎 Build Squint static CDN Demo
run: bb squint:demo:build
- name: 📠 Copy static build to bucket under SHA
run: gsutil cp -r public gs://nextjournal-snapshots/clojure-mode/squint-build/${{ github.sha }}
- name: ✅ Add link to Clojure Mode Squint Demo
uses: Sibz/github-status-action@v1
with:
authToken: ${{secrets.GITHUB_TOKEN}}
context: 'CI / Static App / Squint'
description: 'Ready'
state: 'success'
sha: ${{github.event.pull_request.head.sha || github.sha}}
target_url: https://snapshots.nextjournal.com/clojure-mode/squint-build/${{ github.sha }}/squint-cdn-demo
snapshot:
name: Static App / Build
runs-on: ubuntu-latest
steps:
- name: 🛎 Checkout
uses: actions/checkout@v2
- name: 🔐 Google Auth
uses: google-github-actions/auth@v0
with:
credentials_json: ${{ secrets.GCLOUD_SERVICE_KEY }}
- name: 🔧 Setup Google Cloud SDK
uses: google-github-actions/setup-gcloud@v0.3.0
- name: 🔧 Install java
uses: actions/setup-java@v1
with:
java-version: '11.0.7'
- name: 🔧 Install clojure
uses: DeLaGuardo/setup-clojure@master
with:
cli: '1.10.3.943'
- name: 🧶 Yarn Install
run: yarn install
- name: 🧶 Yarn Build
run: |
yarn build
- name: 📠 Copy static build to bucket under SHA
run: gsutil cp -r public gs://nextjournal-snapshots/clojure-mode/build/${{ github.sha }}
- name: 📠 Copy static build to GitHub Pages
if: ${{ github.ref == 'refs/heads/main' }}
uses: JamesIves/github-pages-deploy-action@4.1.6
with:
branch: gh-pages # The branch the action should deploy to.
folder: public # The folder the action should deploy.
- name: ✅ Add link to Clojure Mode Demo
uses: Sibz/github-status-action@v1
with:
authToken: ${{secrets.GITHUB_TOKEN}}
context: 'CI / Static App / Clojure Mode'
description: 'Ready'
state: 'success'
sha: ${{github.event.pull_request.head.sha || github.sha}}
target_url: https://snapshots.nextjournal.com/clojure-mode/build/${{ github.sha }}
- name: ✅ Add link to LiveDoc Demo
uses: Sibz/github-status-action@v1
with:
authToken: ${{secrets.GITHUB_TOKEN}}
context: 'CI / Static App / LiveDoc'
description: 'Ready'
state: 'success'
sha: ${{github.event.pull_request.head.sha || github.sha}}
target_url: https://snapshots.nextjournal.com/clojure-mode/build/${{ github.sha }}/livedoc