docsify icon indicating copy to clipboard operation
docsify copied to clipboard

update(ci): add update emoji schedule workflow

Open Koooooo-7 opened this issue 1 year ago • 2 comments

Summary

Add update emoji schedule workflow to daily update emoji data. Changes:

  • Support schedule at UTC 2:00 daily run, or manually trigger.
  • Remove the build:emoji out of build.
  • Remove the try catch from emoji.js to ensure the writeJS and wirteMarkdown in same transaction (both success or failed), so, we could just check the last write file (src/core/render/emoji-data.js) changes and add them all.
  • The commit branch uses the update-emoji-data-$current_date-${last commit hash 7} to be an unique branch commit, it makes it possible that we could manually trigger multi times in a day or it were be trigger both in schedule and manually does.

Others:

  • Hasn't added a build:emoji in release.sh since it is unlikely happen as per our discussion.

close #2434

  • PR Screenshot 2024-05-22 at 22 42 06

  • Branch details Screenshot 2024-05-22 at 22 42 47

Related issue, if any:

What kind of change does this PR introduce?

Build-related changes

For any code change,

  • [ ] Related documentation has been updated, if needed
  • [x] Related tests have been added or updated, if needed

Does this PR introduce a breaking change?

No

Tested in the following browsers:

  • [ ] Chrome
  • [ ] Firefox
  • [ ] Safari
  • [ ] Edge

Koooooo-7 avatar May 22 '24 14:05 Koooooo-7

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docsify-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 24, 2024 5:15am

vercel[bot] avatar May 22 '24 14:05 vercel[bot]

This looks great, @Koooooo-7. A few minor naming nitpicks, but otherwise this looks good.

I will update it.

Has this been tested? If not, it seems like we could by removing a data property entry from /src/core/render/emoji-data.js, committing the change, then waiting to see if this workflow generates the expected PR.

I tested it from a fork. ( the screenshot is gotten from that). And when we merge it into develop,we could manually trigger it for a test again.

And we don't need mock a emoji update since there already exists emoji update between our emojiData and github.

Koooooo-7 avatar May 23 '24 01:05 Koooooo-7

Looks like @sy-records prefers we replace the git commands with actions, but otherwise this looks good to me.

I will negotiate with him and do the updates if needs.

Koooooo-7 avatar May 24 '24 02:05 Koooooo-7

Sounds good, @Koooooo-7. Looks like this is ready to merge whenever you and @sy-records resolve the actions discussion. :)

Thanks for getting this up and running so quickly!

jhildenbiddle avatar May 24 '24 14:05 jhildenbiddle