update cheat of zhonganchebao #126
This file contains hidden or 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: build and deploy to gh-pages | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| build_and_deploy_to_gh_pages: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@main | |
| - uses: actions/setup-node@main | |
| with: | |
| node-version: 16 | |
| - run: | | |
| npm ci | |
| npm run build | |
| - run: echo 'mebtte.com' > build/CNAME | |
| - env: | |
| TOKEN: ${{secrets.TOKEN}} | |
| run: | | |
| cd build | |
| git init | |
| git config --local user.name mebtte | |
| git config --local user.email hi@mebtte.com | |
| git remote add origin https://$TOKEN@github.com/$GITHUB_REPOSITORY.git | |
| git checkout -b gh-pages | |
| git add --all | |
| git commit -m "deploy gh-pages" | |
| git push origin gh-pages -f |