Skip to content

fix: 修正 CI workflow 並更新版權年份至 2026#16

Merged
thc1006 merged 2 commits intomainfrom
fix/ci-workflow-and-copyright-year
Jan 27, 2026
Merged

fix: 修正 CI workflow 並更新版權年份至 2026#16
thc1006 merged 2 commits intomainfrom
fix/ci-workflow-and-copyright-year

Conversation

@thc1006
Copy link
Owner

@thc1006 thc1006 commented Jan 27, 2026

Summary

  • CI workflow 修正:將 stefanzweifel/git-auto-commit-action@v5 替換為 peter-evans/create-pull-request@v7,搜尋索引更新改以 PR 方式提交,避免直接推送至 main 分支
  • 版權年份更新:全站 22 個 HTML 頁面的 footer 版權年份從 2025 更新至 2026

Test plan

  • 確認 CI workflow 在 main 分支 push 時能正確觸發並建立 PR
  • 確認 link-check job 仍能正常執行
  • 抽查數個頁面確認 footer 顯示 © 2026

- 將 CI 中的 git-auto-commit-action 替換為 create-pull-request,
  避免直接推送至 main 分支,改以 PR 方式提交搜尋索引更新
- 更新全站 22 個 HTML 頁面的版權年份從 2025 至 2026
Copilot AI review requested due to automatic review settings January 27, 2026 05:18
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the CI workflow strategy and refreshes copyright information across the website for the new year 2026.

Changes:

  • Modified CI workflow to use pull request-based updates instead of direct commits to main branch for search index changes
  • Updated copyright year from 2025 to 2026 across all 22 HTML pages site-wide

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
.github/workflows/link-checker.yml Replaced git-auto-commit-action with create-pull-request action to submit search index updates via PR instead of direct push
sitemap.html Updated footer copyright year to 2026
about.html Updated footer copyright year to 2026
index.html Updated footer copyright year to 2026
advanced-resources/competitions.html Updated footer copyright year to 2026
advanced-resources/index.html Updated footer copyright year to 2026
advanced-resources/online-courses.html Updated footer copyright year to 2026
advanced-resources/reading-list.html Updated footer copyright year to 2026
autonomous-learning/index.html Updated footer copyright year to 2026
autonomous-learning/methodology.html Updated footer copyright year to 2026
autonomous-learning/plan-templates.html Updated footer copyright year to 2026
autonomous-learning/resource-map.html Updated footer copyright year to 2026
autonomous-learning/topic-ideas.html Updated footer copyright year to 2026
career-exploration/competency-map.html Updated footer copyright year to 2026
career-exploration/index.html Updated footer copyright year to 2026
career-exploration/major-explorer.html Updated footer copyright year to 2026
career-exploration/senior-interviews.html Updated footer copyright year to 2026
civic-tech-map/index.html Updated footer copyright year to 2026
learning-portfolio/activity-database.html Updated footer copyright year to 2026
learning-portfolio/index.html Updated footer copyright year to 2026
learning-portfolio/portfolio-gallery.html Updated footer copyright year to 2026
learning-portfolio/reflection-guide.html Updated footer copyright year to 2026
learning-portfolio/tools.html Updated footer copyright year to 2026

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +29 to +36
- name: Create Pull Request for search index
if: github.ref == 'refs/heads/main'
uses: peter-evans/create-pull-request@v7
with:
commit_message: "chore(bot): ✨ 自動更新搜尋索引"
file_pattern: 'search-index.json'
commit-message: "chore(bot): 自動更新搜尋索引"
title: "chore(bot): 自動更新搜尋索引"
body: "由 CI 自動產生:搜尋索引檔案已更新。"
branch: chore/update-search-index
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow will create a pull request every time the search index changes on the main branch. However, there's a potential issue: if the same branch name 'chore/update-search-index' already exists with an open PR, this could fail or cause conflicts. Consider adding the 'delete-branch' parameter set to true to clean up merged branches, or use a unique branch name with a timestamp or commit SHA.

Copilot uses AI. Check for mistakes.
Comment on lines 29 to 37
- name: Create Pull Request for search index
if: github.ref == 'refs/heads/main'
uses: peter-evans/create-pull-request@v7
with:
commit_message: "chore(bot): ✨ 自動更新搜尋索引"
file_pattern: 'search-index.json'
commit-message: "chore(bot): 自動更新搜尋索引"
title: "chore(bot): 自動更新搜尋索引"
body: "由 CI 自動產生:搜尋索引檔案已更新。"
branch: chore/update-search-index
add-paths: search-index.json
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The create-pull-request action requires appropriate permissions to create pull requests. Without an explicit token parameter, it will use the default GITHUB_TOKEN, which should work for most cases. However, be aware that PRs created with GITHUB_TOKEN won't trigger other workflow runs (like CI checks on the PR itself). If you need the PR to trigger workflows, consider using a Personal Access Token (PAT) or GitHub App token with the 'token' parameter.

Copilot uses AI. Check for mistakes.
Comment on lines 29 to 37
- name: Create Pull Request for search index
if: github.ref == 'refs/heads/main'
uses: peter-evans/create-pull-request@v7
with:
commit_message: "chore(bot): ✨ 自動更新搜尋索引"
file_pattern: 'search-index.json'
commit-message: "chore(bot): 自動更新搜尋索引"
title: "chore(bot): 自動更新搜尋索引"
body: "由 CI 自動產生:搜尋索引檔案已更新。"
branch: chore/update-search-index
add-paths: search-index.json
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow will only create a pull request if there are actual changes to search-index.json. However, if no changes are detected, the action will still succeed but not create a PR. Consider checking the action output and potentially adding a condition or notification to track when updates are skipped due to no changes.

Copilot uses AI. Check for mistakes.
- 移除上一次 PowerShell 寫入時意外加入的 UTF-8 BOM (0xEF 0xBB 0xBF)
- workflow 加入 delete-branch: true,確保合併後自動清理分支
@thc1006 thc1006 merged commit cec3950 into main Jan 27, 2026
2 checks passed
@thc1006 thc1006 deleted the fix/ci-workflow-and-copyright-year branch January 27, 2026 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments