Update how_to_view_tables.md #297
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Master CI | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
prettier: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
ref: ${{ github.head_ref }} | |
- name: Run prettier on src/web | |
working-directory: src/web | |
run: | | |
PRETTIER_VERSION=$(cat package.json | \ | |
grep \"prettier\" | \ | |
tr -d '[:space:]' | \ | |
awk -F: '{print substr($2, 2, length($2) - 3)}') | |
if ! npx prettier@$PRETTIER_VERSION "**/*.(js|vue)" --check; | |
then | |
echo "Running prettier" | |
npx prettier@$PRETTIER_VERSION "**/*.(js|vue)" --write | |
echo "Setting up git" | |
git config --global user.name "I'm a Github Action" | |
git config --global user.email "beepboop@github.com" | |
git remote set-url origin https://x-access-token:${{ secrets.LINT_PAT }}@github.com/${{ github.repository }} | |
echo "Committing changes" | |
git commit -am "beep boop Github Action Master Branch CI Prettier hard at work" | |
git push | |
echo "Changes pushed" | |
exit 1 | |
else | |
echo "Files are clean" | |
fi | |