Skip to content

Commit d35506b

Browse files
author
ChenYong
committed
update code style; update CI scripts; alpha release
1 parent d561e7f commit d35506b

File tree

8 files changed

+124
-11
lines changed

8 files changed

+124
-11
lines changed

.github/workflows/deploy.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
2+
name: Deploy package
3+
4+
on:
5+
release:
6+
types: [created]
7+
8+
jobs:
9+
deploy:
10+
name: Deploy
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- run: curl -O https://download.clojure.org/install/linux-install-1.10.1.507.sh && chmod +x linux-install-1.10.1.507.sh && sudo ./linux-install-1.10.1.507.sh
16+
17+
- uses: actions/checkout@v2
18+
19+
- name: Get yarn cache
20+
id: yarn-cache
21+
run: echo "::set-output name=dir::$(yarn cache dir)"
22+
23+
- uses: actions/cache@v1
24+
name: Cache node modules of yarn
25+
with:
26+
path: ${{ steps.yarn-cache.outputs.dir }}
27+
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
28+
restore-keys: |
29+
${{ runner.os }}-yarn-
30+
31+
- name: Cache Clojars
32+
uses: actions/cache@v1
33+
env:
34+
cache-name: cache-clojars
35+
with:
36+
path: ~/.m2/repository
37+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('shadow-cljs.edn') }}
38+
restore-keys: |
39+
${{ runner.os }}-clojars
40+
41+
- name: run tests
42+
run: 'yarn && yarn shadow-cljs compile client'
43+
44+
- run: echo Working on ${{ github.ref }}
45+
46+
- name: deploy to clojars
47+
run: env CLOJARS_USERNAME=jiyinyiyong CLOJARS_PASSWORD=${{ secrets.CLOJARS_PASSWORD }} clojure -A:release

.github/workflows/upload.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
2+
name: Upload Assets
3+
4+
on:
5+
pull_request: {}
6+
push:
7+
branches:
8+
- master
9+
10+
jobs:
11+
upload-assets:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: docker://timbru31/java-node:latest
16+
17+
- name: Get yarn cache
18+
id: yarn-cache
19+
run: echo "::set-output name=dir::$(yarn cache dir)"
20+
21+
- uses: actions/cache@v1
22+
name: Cache node modules of yarn
23+
with:
24+
path: ${{ steps.yarn-cache.outputs.dir }}
25+
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
26+
restore-keys: |
27+
${{ runner.os }}-yarn-
28+
29+
- name: Cache Clojars
30+
uses: actions/cache@v1
31+
env:
32+
cache-name: cache-clojars
33+
with:
34+
path: ~/.m2/repository
35+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('shadow-cljs.edn') }}
36+
restore-keys: |
37+
${{ runner.os }}-clojars
38+
39+
- run: yarn && yarn build
40+
name: Build web assets
41+
42+
- name: Deploy to server
43+
id: deploy
44+
uses: Pendect/action-rsyncer@v1.1.0
45+
env:
46+
DEPLOY_KEY: ${{secrets.rsync_private_key}}
47+
with:
48+
flags: '-avzr --progress'
49+
options: ''
50+
ssh_options: ''
51+
src: 'dist/*'
52+
dest: 'rsync-user@tiye.me:/web-assets/repo/${{ github.repository }}'
53+
54+
- name: Display status from deploy
55+
run: echo "${{ steps.deploy.outputs.status }}"

calcit.cirru

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@
358358
:data $ {}
359359
|T $ {} (:type :leaf) (:by |root) (:at 1516429602614) (:text |def) (:id |rJbWHxPlBz)
360360
|j $ {} (:type :leaf) (:by |root) (:at 1516429369300) (:text |font-code) (:id |HkfWrewlHz)
361-
|r $ {} (:type :leaf) (:by |root) (:at 1516429611656) (:text "||Source Code Pro, Menlo, monospace") (:id |r1x3QbvlSG)
361+
|r $ {} (:type :leaf) (:by |bjmr3HZle) (:at 1583727181875) (:text "||Source Code Pro, Menlo, Ubuntu Mono, Consolas, monospace") (:id |r1x3QbvlSG)
362362
|textarea $ {} (:type :expr) (:id |SJDX48t3Kij-) (:by nil) (:at 1506675837748)
363363
:data $ {}
364364
|T $ {} (:type :leaf) (:id |Bkd7VUY2Fijb) (:text |def) (:by |root) (:at 1506675837748)

deps.edn

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
{
3+
:paths ["src"]
4+
:aliases {
5+
:release {
6+
:extra-deps {
7+
appliedscience/deps-library {:mvn/version "0.3.4"}
8+
}
9+
:main-opts ["-m" "deps-library.release"]
10+
}
11+
}
12+
}

meyvn.edn

Lines changed: 0 additions & 9 deletions
This file was deleted.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
"description": "Respo UI",
55
"main": "index.js",
66
"scripts": {
7+
"deploy": "clj -A:release",
8+
"m2": "clj -A:release install",
79
"watch": "shadow-cljs watch client",
810
"serve": "http-server dist -s",
911
"build-cdn": "shadow-cljs clj-run build.main/build-cdn",

release.edn

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{:version "0.3.14-a1"
2+
:group-id "respo"
3+
:artifact-id "ui"
4+
:description "Tiny collection of styles used in Respo"
5+
:skip-tag true
6+
:scm-url "https://github.com/Respo/respo-ui"}

src/respo_ui/core.cljs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
(def flex {:flex 1})
4747

48-
(def font-code "Source Code Pro, Menlo, monospace")
48+
(def font-code "Source Code Pro, Menlo, Ubuntu Mono, Consolas, monospace")
4949

5050
(def font-fancy "Josefin Sans, Helvetica neue, Arial, sans-serif")
5151

0 commit comments

Comments
 (0)