name: 鑷姩閮ㄧ讲 on: push: branches: - master release: types: - published workflow_dispatch: env: TZ: Asia/Shanghai jobs: deploy: runs-on: ubuntu-latest steps: - name: 妫€鏌ュ垎鏀? uses: actions/checkout@v4 with: ref: master - name: 缂撳瓨椤圭洰 npm 鍖? id: cache-node-modules uses: actions/cache@v3 with: path: node_modules key: ${{ runner.os }}-nodeModules-${{ hashFiles('package-lock.json') }}-${{ hashFiles('package.json') }} restore-keys: | ${{ runner.os }}-nodeModules- - name: 瀹夎 Node uses: actions/setup-node@v4 with: node-version: "22.x" - name: 瀹夎渚濊禆 if: steps.cache-node-modules.outputs.cache-hit != 'true' run: | npm install - name: 娓呯悊鏂囦欢鏍? run: | npm run clean - name: 鐢熸垚闈欐€佹枃浠跺苟鍘嬬缉 run: | npm run build - name: 閮ㄧ讲 run: | cd ./dist git init git config user.name "${{ gitea.actor }}" git config user.email "${{ gitea.actor }}@noreply.gitea.io" git add . git commit -m "${{ gitea.event.head_commit.message }}路路[$(date +"%Z %Y-%m-%d %A %H:%M:%S")]" git push --force --quiet "https://${{ gitea.actor }}:${{ secrets.DEPLOY_TOKEN }}@git.biss.click/biss/blog.git" master:page - name: Deploy to Server run: | curl -k -X POST "https://panel.biss.click/hook?access_key=1XJG8IvYTSZVvD5dpm86GYIpQxgxBcucULnX1MFskZSKayXU"