doc: readme. #17
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: DeployGihubPage | |
on: | |
push: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- run: | | |
yarn install | |
yarn build | |
touch ./dist/.nojekyll | |
git config --global user.email "github@example.com" | |
git config --global user.name "git workflows" | |
git add dist/ -f | |
git commit -m "Deploy gh-pages" | |
#git subtree push --prefix dist origin gh-pages | |
git subtree split --prefix dist -b gh-pages | |
git push -f origin gh-pages:gh-pages | |
git branch -D gh-pages |