Skip to content

use category cache

use category cache #77

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches: [ main, master ]
workflow_dispatch:
permissions: write-all
env:
# 是否重新生成 vod/xvod 的 category("0" | "1")
VOD_CATES: "0"
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Generate configuration file
run: |
bunx kitty-parse -o x.json
bun run vod.ts vod.json xvod.json
bun run t4.ts t4.json
bun run pages.ts index.html
- name: Prepare deployment directory
run: |
mkdir -p deploy
cp x.json vod.json xvod.json t4.json index.html deploy/
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: deploy
publish_branch: gh-pages
force_orphan: true
keep_files: false
commit_message: 'Deploy: Update configuration file'
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
# https://dash.cloudflare.com/d0b0e0bf95cfa5f4da47b01848014b39/pages/view/d1y/settings/production
- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v3.0
with:
publish-dir: './deploy'
production-branch: gh-pages
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
enable-pull-request-comment: false
enable-commit-comment: true
overwrites-pull-request-comment: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1