Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/generate-archive.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Generate Combined Archive

on:
push:
paths:
- 'archive/history[0-9][0-9][0-9][0-9].md' # history2020.md等にマッチ
workflow_dispatch: # 手動実行用

permissions:
contents: write

jobs:
generate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Generate combined archive
run: |
chmod +x scripts/generate-combined-archive.sh
./scripts/generate-combined-archive.sh

- name: Commit if changed
run: |
git config user.name github-actions[bot]
git config user.email github-actions[bot]@users.noreply.github.com
git add archive/history_all.md
git diff --staged --quiet || git commit -m "Auto-generate combined archive"
git push
2 changes: 2 additions & 0 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,13 @@ layout: default

以下のリンクでは発表者と発表タイトル,および資料へのリンクを記録しています.

- **[全アーカイブ(第0回〜最新)](archive/history_all)**
- [2020年の記録(第0回〜第7回)](archive/history2020)
- [2021年の記録(第8回〜第19回)](archive/history2021)
- [2022年の記録(第20回〜第31回)](archive/history2022)
- [2023年の記録(第32回〜第42回)](archive/history2023)
- [2024年の記録(第43回〜第48回)](archive/history2024)
- [2025年の記録(第49回〜)](archive/history2025)

## 主催

Expand Down
36 changes: 36 additions & 0 deletions scripts/generate-combined-archive.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash
# 全アーカイブを1ページに結合
OUTPUT="archive/history_all.md"

# ヘッダー生成
cat << 'EOF' > "$OUTPUT"
---
description: 全勉強会アーカイブ(第0回〜最新)
---

<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?">

# ロボティクス勉強会 全アーカイブ

このページは検索性向上のため、全ての勉強会記録を1ページにまとめたものです。

**年ごとの記録:**
[2020年](history2020) | [2021年](history2021) | [2022年](history2022) | [2023年](history2023) | [2024年](history2024) | [2025年](history2025)

---

EOF

# 古い年から新しい年へ順に結合
for year in 2020 2021 2022 2023 2024 2025; do
file="archive/history${year}.md"
if [ -f "$file" ]; then
# frontmatter、linkタグ、Backリンク、区切り線を除去
sed -n '/^# /,$p' "$file" | \
sed '/^\[Back\]/d' | \
sed '/^- - -$/d' >> "$OUTPUT"
echo -e "\n---\n" >> "$OUTPUT"
fi
done

echo "[Back](../index)" >> "$OUTPUT"