dequelabs / axe-api-team-public

Shared configuration, settings, and actions for the Axe API Team

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tebt-debt: rebuild `dist` for GitHub actions and local builds

Zidious opened this issue · comments

commented

Whenever we make changes to the actions source code we need to rebuild the dist directory so we pull in the latest changes (that gets bundled into index.js). This is prone to error, instead we should not rely on the user to rebuild the action but automate it.

  1. Add the build step to husky's pre-commit hook that way if any commit a user does we will rebuild and automatically add any changed dist files to the commit
  2. We should add a action similar to the Formatter action that re-builds the dist and commits any changes to the pull-request. This cover cases where the developer commits changes via suggestions within the UI
  3. When building locally, we should have a prebuild step to call rimraf dist in case the build changes/removes any emitted files