Skip to content

Commit 4ad3e36

Browse files
authored
ci: Optimize CI processes (#2451)
1 parent 5088fcc commit 4ad3e36

File tree

3 files changed

+43
-53
lines changed

3 files changed

+43
-53
lines changed

.github/workflows/crowdin.yml

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99

1010
jobs:
1111
crowdin:
12+
if: github.repository == 'docsifyjs/docsify'
1213
runs-on: ubuntu-latest
1314
steps:
1415
- name: Checkout

.github/workflows/emoji.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Sync Emoji
2+
3+
on:
4+
schedule:
5+
- cron: '0 2 * * *'
6+
workflow_dispatch:
7+
8+
jobs:
9+
sync-emoji:
10+
if: github.repository == 'docsifyjs/docsify'
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: latest
18+
cache: 'npm'
19+
20+
- name: Install dependencies
21+
run: npm ci --ignore-scripts
22+
23+
- name: Run script to sync emoji data
24+
run: npm run build:emoji
25+
26+
- name: Commit
27+
id: auto-commit-action
28+
uses: stefanzweifel/git-auto-commit-action@v5
29+
with:
30+
commit_message: 'chore: Sync emoji data with GitHub emoji API'
31+
branch: sync-emoji
32+
create_branch: true
33+
file_pattern: 'src/core/render/emoji-data.js docs/emoji.md'
34+
push_options: '--force'
35+
36+
- name: Create Pull Request
37+
if: ${{ steps.auto-commit-action.outputs.changes_detected == 'true' }}
38+
run: |
39+
gh pr create --title 'chore: Sync emoji data with GitHub emoji API' --body 'Found updated github emojis need to sync.' --base develop --reviewer docsifyjs/reviewers
40+
continue-on-error: true
41+
env:
42+
GH_TOKEN: ${{ secrets.READ_TEAM_TOKEN }}

.github/workflows/update-emoji.yml

-53
This file was deleted.

0 commit comments

Comments
 (0)