Add intl pre-commit hook and update GHA (#1416)

* Add intl pre-commit hook and update GHA

- add Husky lib
- add pre-commit script
- detect warning on extraction and abort commit
- update deploy staging yml to show message that en.json was modified

* Test if block of message post

- test if the message is posted even when checking a file with no changes

* Add back in full deploy action

* Add back en.json
This commit is contained in:
Vim 2022-03-17 13:03:26 -04:00 committed by GitHub
commit 14ad8c2ee4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 787 additions and 185 deletions

View file

@ -95,3 +95,16 @@ jobs:
- name: Printing deployment URLs
run: |
echo "Github pages: https://usds.github.io/justice40-tool/$DESTINATION_FOLDER/en"
- name: Get changed files using defaults
id: changed-files
uses: tj-actions/changed-files@v18.1
- name: Update PR with message that en.json has been updated
uses: mshick/add-pr-comment@v1
with:
message: |
** 👋 Attention translators!! 👋 **
Copy changes have resulted in a new en.json file. Please translate all other language files.
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token-user-login: "github-actions[bot]" # The user.login for temporary GitHub tokens
allow-repeats: false # This is the default
if: contains(steps.changed-files.outputs.modified_files, 'client/src/intl/en.json')