summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/ISSUE_TEMPLATE/投稿模板.md14
-rw-r--r--.github/workflows/build-unocss.yml35
-rw-r--r--.github/workflows/extract-data.yml43
-rw-r--r--.github/workflows/fetch-linkding-rss.yml52
-rw-r--r--.github/workflows/fetch-webmentions.yml56
5 files changed, 0 insertions, 200 deletions
diff --git a/.github/ISSUE_TEMPLATE/投稿模板.md b/.github/ISSUE_TEMPLATE/投稿模板.md
deleted file mode 100644
index c8a3d2a2..00000000
--- a/.github/ISSUE_TEMPLATE/投稿模板.md
+++ /dev/null
@@ -1,14 +0,0 @@
----
-name: 投稿模板
-about: 向稻草人周刊投稿
-title: "[投稿] "
-labels: 投稿
-assignees: BigCoke233
-
----
-
-## 原文链接
-
-## 投稿栏目
-
-## 投稿理由
diff --git a/.github/workflows/build-unocss.yml b/.github/workflows/build-unocss.yml
deleted file mode 100644
index b6768411..00000000
--- a/.github/workflows/build-unocss.yml
+++ /dev/null
@@ -1,35 +0,0 @@
-name: Build UnoCSS
-
-on:
- push:
-
-jobs:
- build-uno:
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v4
-
- - uses: pnpm/action-setup@v4
- with:
- version: 9
-
- - uses: actions/setup-node@v4
- with:
- node-version: 20
- cache: pnpm
-
- - name: Install deps
- run: pnpm install --frozen-lockfile
-
- - name: Build UnoCSS
- run: pnpm run build:uno:prod
-
- - name: Commit if changed
- run: |
- git config user.name "github-actions[bot]"
- git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
-
- git add .
- git commit -m "chore(unocss): rebuild styles" || exit 0
- git push
diff --git a/.github/workflows/extract-data.yml b/.github/workflows/extract-data.yml
deleted file mode 100644
index 968ab16c..00000000
--- a/.github/workflows/extract-data.yml
+++ /dev/null
@@ -1,43 +0,0 @@
-name: Extract Data from Content
-
-on:
- push:
- branches:
- - master
- paths:
- - 'content/**/*.md'
- - 'scripts/*.go'
- workflow_dispatch:
-
-# Prevent concurrent runs to avoid conflicts
-concurrency:
- group: data-extraction
- cancel-in-progress: true
-
-jobs:
- extract-data:
- name: Extract Data from Content
- runs-on: ubuntu-latest
- steps:
- - name: Checkout repository
- uses: actions/checkout@v4
-
- - name: Setup Go
- uses: actions/setup-go@v5
- with:
- go-version: '1.21'
-
- - name: Extract highlights
- run: go run scripts/extract_highlights.go
-
- - name: Generate external link rank
- run: go run scripts/get_external_link_rank.go
-
- - name: Generate internal link graph
- run: go run scripts/get_internal_link_graph.go
-
- - name: Commit all data
- uses: stefanzweifel/git-auto-commit-action@v5
- with:
- commit_message: 'chore: update data from scripts'
- file_pattern: 'data/highlights.json data/externallinks.json static/link-graph.json'
diff --git a/.github/workflows/fetch-linkding-rss.yml b/.github/workflows/fetch-linkding-rss.yml
deleted file mode 100644
index bdcdffb4..00000000
--- a/.github/workflows/fetch-linkding-rss.yml
+++ /dev/null
@@ -1,52 +0,0 @@
-name: Fetch Linkding RSS Feed
-
-on:
- schedule:
- # Run daily at 2 AM UTC
- - cron: '0 2 * * *'
- workflow_dispatch: # Allow manual triggering
-
-jobs:
- fetch-rss:
- runs-on: ubuntu-latest
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@v4
-
- - name: Create data directory if it doesn't exist
- run: mkdir -p data
-
- - name: Fetch RSS feed
- run: |
- curl -s "https://links.eltr.ac/feeds/shared?limit=12" -o data/linkding.xml
-
- - name: Check if file was downloaded successfully
- run: |
- if [ ! -f data/linkding.xml ]; then
- echo "Error: RSS feed file not downloaded"
- exit 1
- fi
-
- # Check if file contains valid XML content
- if ! grep -q "<?xml" data/linkding.xml; then
- echo "Error: Downloaded file is not valid XML"
- exit 1
- fi
-
- echo "RSS feed downloaded successfully"
- echo "File size: $(wc -c < data/linkding.xml) bytes"
-
- - name: Commit and push changes
- run: |
- git config --local user.email "action@github.com"
- git config --local user.name "GitHub Action"
-
- # Check if there are changes
- if git diff --quiet HEAD -- data/linkding.xml; then
- echo "No changes to commit"
- else
- git add data/linkding.xml
- git commit -m "Update Linkding RSS feed - $(date -u '+%Y-%m-%d %H:%M:%S UTC')"
- git push
- fi \ No newline at end of file
diff --git a/.github/workflows/fetch-webmentions.yml b/.github/workflows/fetch-webmentions.yml
deleted file mode 100644
index d78096dc..00000000
--- a/.github/workflows/fetch-webmentions.yml
+++ /dev/null
@@ -1,56 +0,0 @@
-name: Fetch Webmentions
-
-on:
- schedule:
- - cron: "*/30 * * * *" # every 30 minutes
- workflow_dispatch:
-
-jobs:
- fetch:
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v4
-
- - name: Fetch webmentions
- env:
- TOKEN: ${{ secrets.WEBMENTION_IO_TOKEN }}
- DOMAIN: ${{ secrets.WEBMENTION_IO_DOMAIN }}
- run: |
- mkdir -p data
-
- curl -s "https://webmention.io/api/mentions.jf2?domain=$DOMAIN&token=$TOKEN" \
- | jq '
- .children
- | map(
- .["wm-target"] |= sub("^https?://[^/]+";"")
- )
- | sort_by(."wm-target")
- | group_by(."wm-target")
- | map({
- (.[0]."wm-target"):
- map({
- type: ."wm-property",
- author: .author,
- url: .url,
- source: ."wm-source",
- published: .published,
- received: ."wm-received",
- content: (if has("content") then .content else null end)
- })
- })
- | add
- ' > data/webmentions.json
-
- - name: Commit if changed
- run: |
- if git diff --quiet; then
- echo "No changes"
- exit 0
- fi
-
- git config user.name "github-actions"
- git config user.email "github-actions@github.com"
- git add data/webmentions.json
- git commit -m "chore: update webmentions"
- git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git