Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⬆️ Update tabi theme #4

Closed
wants to merge 2 commits into from
Closed
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
22 changes: 22 additions & 0 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Test build

on:
pull_request:
branches:
- main
workflow_dispatch:

jobs:
test:
name: Test Site Build
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
submodules: true

- name: Zola Build
uses: shalzz/[email protected]
env:
BUILD_ONLY: true
76 changes: 76 additions & 0 deletions .github/workflows/update-tabi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Update tabi theme

on:
workflow_dispatch:
schedule:
- cron: "5 0 * * 1" # Weekly on Mondays at 5 past midnight UTC

jobs:
update-tabi:
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Configure Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"

- name: Check for updates
id: check
run: |
cd themes/tabi
CURRENT=$(git rev-parse HEAD)
git fetch
git checkout origin/main
NEW=$(git rev-parse HEAD)
if [ "$CURRENT" != "$NEW" ]; then
# Get the changelog with links to commits and PRs
CHANGELOG=$(git log --pretty=format:"- %s [%h](https://github.com/welpo/tabi/commit/%H)" $CURRENT..$NEW | sed -E 's/#([0-9]+)/[#\1](https:\/\/github.com\/welpo\/tabi\/pull\/\1)/g')
echo "has_changes=true" >> "$GITHUB_OUTPUT"
echo "old_version=${CURRENT:0:7}" >> "$GITHUB_OUTPUT"
echo "new_version=${NEW:0:7}" >> "$GITHUB_OUTPUT"
echo "changelog<<EOF" >> "$GITHUB_OUTPUT"
echo "$CHANGELOG" >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"
fi
cd ../..

- name: Create Pull Request
if: steps.check.outputs.has_changes == 'true'
run: |
BRANCH="update-tabi-$(date +%Y%m%d-%H%M%S)"
git checkout -b $BRANCH

git add themes/tabi
git commit -m "⬆️ Update tabi theme

From: ${{ steps.check.outputs.old_version }}
To: ${{ steps.check.outputs.new_version }}

Update tabi to the latest version from https://github.com/welpo/tabi"

git push origin $BRANCH
gh pr create \
--title "⬆️ Update tabi theme" \
--body "## Changes in this update

Updating \`themes/tabi\` from [\`${{ steps.check.outputs.old_version }}\`](https://github.com/welpo/tabi/commit/${{ steps.check.outputs.old_version }}) to [\`${{ steps.check.outputs.new_version }}\`](https://github.com/welpo/tabi/commit/${{ steps.check.outputs.new_version }})

### Changelog
Submodule themes/tabi ${{ steps.check.outputs.old_version }}..${{ steps.check.outputs.new_version }}:
${{ steps.check.outputs.changelog }}

---

Auto-generated by the Update tabi theme workflow (in \`.github/workflows/update-tabi.yml\`)."
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion themes/tabi
Submodule tabi updated 45 files
+1 −1 config.toml
+1 −1 content/_index.ca.md
+1 −1 content/_index.es.md
+1 −1 content/_index.md
+1 −1 content/archive/_index.ca.md
+1 −1 content/archive/_index.es.md
+1 −1 content/archive/_index.md
+ content/archive/archive.jpg
+ content/archive/ca_archive.jpg
+ content/archive/es_archive.jpg
+1 −1 content/blog/_index.ca.md
+1 −1 content/blog/_index.es.md
+1 −1 content/blog/_index.md
+ content/blog/blog.jpg
+ content/blog/ca_blog.jpg
+ content/blog/es_blog.jpg
+37 −1 content/blog/markdown/index.ca.md
+37 −1 content/blog/markdown/index.es.md
+37 −1 content/blog/markdown/index.md
+ content/ca.jpg
+ content/es.jpg
+ content/index.jpg
+0 −1 content/pages/about/index.ca.md
+0 −1 content/pages/about/index.es.md
+0 −1 content/pages/about/index.md
+ content/pages/about/social_cards/about.ca.jpg
+ content/pages/about/social_cards/about.es.jpg
+ content/pages/about/social_cards/about.jpg
+1 −1 content/projects/_index.ca.md
+1 −1 content/projects/_index.es.md
+1 −1 content/projects/_index.md
+ content/projects/ca_projects.jpg
+37 −12 content/projects/doteki/index.ca.md
+37 −12 content/projects/doteki/index.es.md
+39 −12 content/projects/doteki/index.md
+ content/projects/es_projects.jpg
+7 −16 content/projects/git-sumi/index.ca.md
+7 −16 content/projects/git-sumi/index.es.md
+8 −17 content/projects/git-sumi/index.md
+ content/projects/projects.jpg
+11 −3 sass/parts/_code.scss
+1 −1 scripts/release
+1 −0 static/social_icons/orcid.svg
+1 −30 templates/partials/header.html
+50 −0 templates/partials/social_media_images.html