* refactor(vuepress-deploy.yml): use classical page deployment * fix(vuepress-deploy.yml): typo
38 lines
931 B
YAML
38 lines
931 B
YAML
name: deploy and publish
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest
|
|
# if: github.repository == 'SocialSisterYi/bilibili-API-collect'
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Setup Node.js environment
|
|
uses: actions/setup-node@v4.0.3
|
|
with:
|
|
node-version: 22
|
|
cache: yarn
|
|
- name: Build with yarn
|
|
run: yarn && yarn build
|
|
- name: Commit & Push
|
|
run: |
|
|
cd .vuepress/dist/
|
|
git init -b gh_pages
|
|
git config user.name "github-actions"
|
|
git config user.email "github-actions@github.com"
|
|
git remote add origin https://user:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
|
|
git add -A .
|
|
git commit -m "generated"
|
|
git push -fu origin gh_pages
|