Bot & Bump version #159
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: [main] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
~ | |
jobs: | |
deploy: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: "18" | |
- run: yarn install | |
- name: Configure git | |
run: | | |
git config user.name "[bot] gh-action deploy" | |
git config user.email "[email protected]" | |
- name: Build | |
run: | | |
set -e | |
yarn build | |
- name: Deploy | |
env: | |
GHP_REPO: github.com/FDCraft/fdcraft.github.io | |
GPA_TOKEN: ${{ secrets.GPA_TOKEN }} | |
run: | | |
cd docs/.vitepress/dist | |
git init | |
git add -A | |
git commit -m 'gh-action deploy' | |
git push -f --set-upstream https://${GPA_TOKEN}@${GHP_REPO} master |