Skip to content

Commit

Permalink
chore: bump up dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ZL-Asica committed Dec 2, 2024
1 parent aaa81fd commit ab1c723
Show file tree
Hide file tree
Showing 176 changed files with 2,204 additions and 2,400 deletions.
11 changes: 0 additions & 11 deletions .github/dependabot.yml

This file was deleted.

92 changes: 49 additions & 43 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
name: Deploy Hexo Site
name: 🐳 Deploy Official Website

on:
pull_request:
branches:
- master
- main
paths:
- "officialWebsite/scaffolds/**"
- "officialWebsite/source/**"
- "officialWebsite/themes/**"
- "officialWebsite/_config.yml"
- "officialWebsite/_config.*.yml"
- "officialWebsite/package.json"
- "officialWebsite/package-lock.json"
- "scaffolds/**"
- "source/**"
- "themes/**"
- "_config.yml"
- "_config.*.yml"
- "package.json"
- "pnpm-lock.yaml"
push:
branches:
- master
- main
paths:
- "officialWebsite/scaffolds/**"
- "officialWebsite/source/**"
- "officialWebsite/themes/**"
- "officialWebsite/_config.yml"
- "officialWebsite/_config.*.yml"
- "officialWebsite/package.json"
- "officialWebsite/package-lock.json"
- "scaffolds/**"
- "source/**"
- "themes/**"
- "_config.yml"
- "_config.*.yml"
- "package.json"
- "pnpm-lock.yaml"

permissions:
contents: write
Expand All @@ -33,44 +33,50 @@ jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
- name: 🛎️ Checkout
uses: actions/checkout@v4
- name: Set up Node.js

- name: 🛠️ Install pnpm
uses: pnpm/action-setup@v4
with:
run_install: false

- name: 🛠️ Setup Node
uses: actions/setup-node@v4
with:
node-version: "latest" # Use the latest Node.js version
- name: Cache dependencies 📦
uses: actions/cache@v4
node-version: "lts/*"
cache: "pnpm"

- name: 🗂️ Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: ⚡ Setup pnpm cache
with:
path: officialWebsite/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Hexo CLI
run: npm install -g hexo-cli
working-directory: ./officialWebsite
- name: Install dependencies 📁
run: npm install
working-directory: ./officialWebsite
- name: Generate Hexo static files
run: npx hexo generate
working-directory: ./officialWebsite
${{ runner.os }}-pnpm-store-
- name: 📂 Install dependencies
run: pnpm install

- name: 🏗️ Build
run: pnpm run build

- name: Purge unused CSS 🧹
run: |
npm install -g purgecss
purgecss -c purgecss.config.js
working-directory: ./officialWebsite
- name: Remove archives and posts directories
run: |
rm -rf public/archives
rm -rf public/posts
working-directory: ./officialWebsite
- name: Deploy 🚀
pnpm install -g purgecss
pnpm purgecss -c purgecss.config.js
- name: Deploy to gh-pages branch 🚀
if: github.event_name != 'pull_request'
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./officialWebsite/public
publish_dir: ./public
# 删除gh-pages分支的现有文件
keep_files: false
# 指定发布到gh-pages分支
Expand Down
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lint-staged
File renamed without changes.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# belugasubs.com
# www.belugasubs.com

Beluga Subtitle Groups Offcial Website. 白鲸字幕组官方网站

Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit ab1c723

Please sign in to comment.