ci: add prettier workflow and refactor others
Description
In this pr we have huge workflow refactoring, and it's only the start of it. I added a workflow with the name preview which will be the base workflow for preview all our changes, for now, preview has a prettier check and test workflows. In the near future preview will have all kinds of preview (docs, packages) and other tools like statistics and so on.
Prettier check can produce 2 variants of exit code for errors:
1means there are format errors which can be fixed2means there are format errors which can not be fixed
If we have 1 variant, our bot will write a comment, "Looks like you forgot to run Prettier. Hopefully, you can automatically fix it by typing /prettify command." After sending, this command will trigger workflow to automatically run prettier and create a commit for it, and the original comment will be deleted by the bot.
If we have 2 variant, our workflow will fail and merging to the default branch will be impossible.
Closes #503 This depends on https://github.com/artalar/reatom/pull/685, after merging and rebase comments with command will work.
Run & review this pull request in StackBlitz Codeflow.
Someone is attempting to deploy a commit to a Personal Account owned by @artalar on Vercel.
@artalar first needs to authorize it.
Closing this one because we agreed to change the way we handle this automatically without typing the command in the comments. The new PR will be open soon.