Upgrade booster version to 5.0.0 #32
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 blog to GitHub page | |
on: | |
push: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/[email protected] | |
with: | |
node-version: '16.x' | |
- name: Install dependencies | |
run: | | |
npm install | |
- name: Build | |
run: | | |
rm -rvf dist | |
npm run docs:build | |
- name: Deploy | |
working-directory: ./dist | |
run: | | |
echo "booster.johnsonlee.io" > CNAME | |
git init | |
git config user.name "johnsonlee" | |
git config user.email "[email protected]" | |
git remote add origin https://johnsonlee:${GH_DEPLOY_TOKEN}@github.com/johnsonlee/booster.johnsonlee.io.git | |
git add . | |
git commit -m "Deployed by GitHub actions" -a | |
git push -u origin HEAD:gh-pages --force | |
env: | |
GH_DEPLOY_TOKEN: ${{ secrets.GH_DEPLOY_TOKEN }} |