-
Notifications
You must be signed in to change notification settings - Fork 403
45 lines (42 loc) · 1.25 KB
/
deploy.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
name: Deploy Iconfont Page
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'packages/core-browser/src/style/icon/**'
jobs:
deploy:
runs-on: ubuntu-22.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: opensumi/actions/bot-token@main
id: bot-token
with:
token-server: ${{ secrets.BOT_TOKEN_SERVER }}
flag: ${{ secrets.BOT_FLAG }}
- uses: actions/checkout@v4
- name: Get yarn cache directory path
id: yarn_cache_dir_path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
id: yarn_cache
with:
path: ${{ steps.yarn_cache_dir_path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Build
run: |
yarn install --immutable
yarn run update:iconfont
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ env.GITHUB_TOKEN }}
publish_dir: ./packages/components/src/icon/iconfont