chore: fix vercel build (#20645)
This commit is contained in:
@@ -71,41 +71,3 @@ jobs:
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git status
|
||||
git diff-index --quiet HEAD || (git commit -m "chore: auto build https://github.com/$GITHUB_REPOSITORY/commit/$GITHUB_SHA" -a --no-verify && git push "https://${GITHUB_ACTOR}:${{ secrets.DOCS_API_TOKEN }}@github.com/RSSNext/rsshub-docs.git" HEAD:main)
|
||||
|
||||
# vercel
|
||||
- id: check-vercel-env
|
||||
env:
|
||||
VERCEL_API_TOKEN: ${{ secrets.VERCEL_API_TOKEN }}
|
||||
if: ${{ env.VERCEL_API_TOKEN != '' }}
|
||||
run: echo "defined=true" >> $GITHUB_OUTPUT
|
||||
- name: Checkout vercel
|
||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||
if: steps.check-vercel-env.outputs.defined == 'true'
|
||||
with:
|
||||
repository: 'RSSNext/rsshub-vercel'
|
||||
token: ${{ secrets.VERCEL_API_TOKEN }}
|
||||
path: rsshub-vercel
|
||||
- name: Build vercel
|
||||
if: steps.check-vercel-env.outputs.defined == 'true'
|
||||
run: pnpm build:vercel
|
||||
- name: Update vercel
|
||||
if: steps.check-vercel-env.outputs.defined == 'true'
|
||||
run: |
|
||||
rm -rf ./rsshub-vercel/src
|
||||
rm -rf ./rsshub-vercel/patches
|
||||
rm -rf ./rsshub-vercel/pnpm-lock.yaml
|
||||
mkdir -p ./rsshub-vercel/src
|
||||
mkdir -p ./rsshub-vercel/patches
|
||||
cp -r ./dist/* ./rsshub-vercel/src
|
||||
cp -r ./patches/* ./rsshub-vercel/patches
|
||||
cd rsshub-vercel
|
||||
pnpm i
|
||||
- name: Commit vercel
|
||||
if: steps.check-vercel-env.outputs.defined == 'true'
|
||||
run: |
|
||||
cd rsshub-vercel
|
||||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git add -A
|
||||
git status
|
||||
git diff-index --quiet HEAD || (git commit -m "chore: auto build https://github.com/$GITHUB_REPOSITORY/commit/$GITHUB_SHA" -a --no-verify && git push "https://${GITHUB_ACTOR}:${{ secrets.VERCEL_API_TOKEN }}@github.com/RSSNext/rsshub-vercel.git" HEAD:main)
|
||||
|
||||
Reference in New Issue
Block a user