Skip to content

2024-06-13 14:14:18 #22

2024-06-13 14:14:18

2024-06-13 14:14:18 #22

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