Skip to content
Latchkey

Sync Emoji workflow (docsifyjs/docsify)

The Sync Emoji workflow from docsifyjs/docsify, explained and optimized by Latchkey.

B

CI health: B - good

Point runs-on at Latchkey and get job timeouts, SHA-pinned actions, self-healing for flaky steps, and up to 58% lower cost, applied automatically.

Grade your own workflow free or run it on Latchkey →
Source: docsifyjs/docsify.github/workflows/emoji.ymlLicense MITView source

What it does

This is the Sync Emoji workflow from the docsifyjs/docsify repository, a real project running GitHub Actions. It is shown here with attribution under its MIT license.

Below, Latchkey shows a faster, safer version produced by its optimization engine.

The workflow

workflow (.yml)
name: Sync Emoji

on:
  schedule:
    - cron: '0 2 * * *'
  workflow_dispatch:

jobs:
  sync-emoji:
    if: github.repository == 'docsifyjs/docsify'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7

      - uses: actions/setup-node@v6
        with:
          node-version: latest
          cache: 'npm'

      - name: Install dependencies
        run: npm ci --ignore-scripts

      - name: Run script to sync emoji data
        run: npm run build:emoji

      - name: Commit
        id: auto-commit-action
        uses: stefanzweifel/git-auto-commit-action@v7
        with:
          commit_message: 'chore: Sync emoji data with GitHub emoji API'
          branch: sync-emoji
          create_branch: true
          file_pattern: 'src/core/render/emoji-data.js docs/emoji.md'
          push_options: '--force'

      - name: Create Pull Request
        if: ${{ steps.auto-commit-action.outputs.changes_detected == 'true' }}
        run: |
          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
        continue-on-error: true
        env:
          GH_TOKEN: ${{ secrets.READ_TEAM_TOKEN }}

The same workflow, on Latchkey

Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.

name: Sync Emoji
 
on:
  schedule:
    - cron: '0 2 * * *'
  workflow_dispatch:
 
jobs:
  sync-emoji:
    timeout-minutes: 30
    if: github.repository == 'docsifyjs/docsify'
    runs-on: latchkey-small
    steps:
      - uses: actions/checkout@v7
 
      - uses: actions/setup-node@v6
        with:
          node-version: latest
          cache: 'npm'
 
      - name: Install dependencies
        run: npm ci --ignore-scripts
 
      - name: Run script to sync emoji data
        run: npm run build:emoji
 
      - name: Commit
        id: auto-commit-action
        uses: stefanzweifel/git-auto-commit-action@v7
        with:
          commit_message: 'chore: Sync emoji data with GitHub emoji API'
          branch: sync-emoji
          create_branch: true
          file_pattern: 'src/core/render/emoji-data.js docs/emoji.md'
          push_options: '--force'
 
      - name: Create Pull Request
        if: ${{ steps.auto-commit-action.outputs.changes_detected == 'true' }}
        run: |
          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
        continue-on-error: true
        env:
          GH_TOKEN: ${{ secrets.READ_TEAM_TOKEN }}
 

What changed

1 third-party action is referenced by a movable tag. Pin it to the commit SHA (Latchkey resolves and applies this automatically) so a repointed tag cannot change what runs.

What Latchkey heals here

This workflow has steps that commonly fail on transient issues (network, registries, flaky browsers). On Latchkey managed runners they are detected, retried, and self-healed instead of failing your build:

This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.

Actions used in this workflow