-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (79 loc) · 2.3 KB
/
storybook.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
name: Deploy demo UI to GitHub Pages
on:
push:
branches: ["main"]
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "16"
- name: Setup Clojure
uses: DeLaGuardo/[email protected]
with:
bb: latest
cli: 1.11.1.1155
- name: Cache clojure dependencies
uses: actions/cache@v3
with:
path: |
~/.m2/repository
~/.gitlibs
~/.deps.clj
**/node_modules
# List all files containing dependencies:
key: cljdeps-${{ hashFiles('deps.edn', 'package-lock.json') }}
# key: cljdeps-${{ hashFiles('deps.edn', 'bb.edn') }}
# key: cljdeps-${{ hashFiles('project.clj') }}
# key: cljdeps-${{ hashFiles('build.boot') }}
restore-keys: cljdeps-
- name: Run sync_design_tokens.clj
run: bb ./scripts/sync_design_tokens.clj
- name: Commit and Push Changes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "Changes detected. Committing and pushing..."
git config user.name "GitHub Action"
git config user.email "[email protected]"
git add .
git commit -m "Update design tokens"
git push origin HEAD:main
else
echo "No changes to commit."
fi
- name: Setup GH Pages
uses: actions/configure-pages@v3
- name: Initialize project
run: make init
- name: Build with Shadow CLJS
run: make pages
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2