Skip to content

Commit 5aa4198

Browse files
committed
删除旧的 depoly.yml
1 parent 3356669 commit 5aa4198

290 files changed

Lines changed: 173 additions & 120 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Hexo Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- '_posts/**'
9+
- 'source/**'
10+
- 'themes/**'
11+
- '!**/jobs_data.json'
12+
workflow_dispatch:
13+
14+
jobs:
15+
build-and-deploy:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: write
19+
pages: write
20+
id-token: write
21+
22+
steps:
23+
- name: Checkout Source
24+
uses: actions/checkout@v4
25+
with:
26+
token: ${{ secrets.GH_TOKEN }}
27+
28+
- name: Set up Node.js
29+
uses: actions/setup-node@v3
30+
with:
31+
node-version: '18'
32+
cache: 'npm'
33+
34+
- name: Install Hexo Dependencies
35+
run: npm install
36+
37+
- name: Build Hexo
38+
run: |
39+
npx hexo clean
40+
npx hexo generate
41+
42+
- name: Upload Pages Artifact
43+
uses: actions/upload-pages-artifact@v3
44+
with:
45+
path: 'public/'
46+
47+
- name: Deploy to GitHub Pages
48+
id: deployment
49+
uses: actions/deploy-pages@v4

.github/workflows/depoly.yml

Lines changed: 0 additions & 76 deletions
This file was deleted.

.github/workflows/spider.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Auto Spider
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
schedule:
8+
- cron: '0 0 * * *'
9+
workflow_dispatch:
10+
11+
jobs:
12+
spider:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
with:
21+
token: ${{ secrets.GH_TOKEN }}
22+
23+
- name: Set up Python
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: '3.10'
27+
28+
- name: Install Dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
pip install requests jieba
32+
33+
- name: Run Spider
34+
run: python py_scripts/crawler.py
35+
36+
- name: Commit Updated Data
37+
run: |
38+
git config --global user.name "github-actions[bot]"
39+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
40+
git add source/api/jobs_data.json
41+
git diff --quiet && git diff --staged --quiet || (git commit -m "chore: update jobs_data.json [skip ci]" && git push)
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)