diff --git a/.github/workflows/prettify.yaml b/.github/workflows/prettify.yaml new file mode 100644 index 0000000..cac6594 --- /dev/null +++ b/.github/workflows/prettify.yaml @@ -0,0 +1,27 @@ +name: Prettify + +on: push + +jobs: + tests: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: "12.x" + - name: Prettify + run: npx prettier --write *.md + - name: Commit + continue-on-error: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + echo "machine github.com login tech-woman password ${GITHUB_TOKEN}" > ~/.netrc + git status + git config user.email "actions@example.com" + git config user.name "GitHub Actions" + git add *.md + git commit -m "style: prettify" + git push origin HEAD:`echo $GITHUB_REF | cut -d '/' -f 3`