Update README.md #18
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: Deploy to GitHub Pages | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set git config | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "yoshihiro503" | |
- name: Merge master branch | |
run: | | |
git fetch --unshallow origin gh-pages | |
git checkout gh-pages | |
git merge master | |
- uses: actions/setup-node@v1 | |
- run: | | |
rm -rf node_modules | |
yarn install | |
yarn build | |
- name: Count changes | |
id: changes | |
run: | | |
git add -N . | |
echo "::set-output name=count::$(git diff --name-only | wc -l)" | |
- name: Commit and Push | |
run: | | |
git add . | |
git commit -m Update | |
git push origin gh-pages | |
if: steps.changes.outputs.count > 0 |