2024-06-13 14:19:06 #23
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: Push to the deploy branch | |
permissions: | |
contents: write | |
on: push | |
jobs: | |
push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install node environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Check out Git repository | |
uses: | |
actions/checkout@v4 | |
# with: | |
# token: {{ secrets.ACCESS_TOKN }} | |
- name: Install dependency | |
run: | | |
npm i pnpm -g | |
pnpm i | |
- name: Build | |
run: pnpm run build | |
- name: Deploy | |
run: | | |
cd ./dist | |
git init | |
git config user.name github-actions[bot] | |
git config user.email github-actions[bot]@users.noreply.github.com | |
git add -A | |
git commit -m 'deploy' | |
git checkout -b deploy | |
git push -f https://${{secrets.ACCESS_TOKN}}@github.com/JQiue/jqiue-notes.git deploy |