Skip to content

Commit 2cfc75e

Browse files
committed
1
0 parents  commit 2cfc75e

31 files changed

Lines changed: 1192 additions & 0 deletions

.github/workflows/push_to_blog.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: push to blog repo
2+
3+
on:
4+
push:
5+
branches:
6+
- src
7+
8+
permissions:
9+
contents: write
10+
11+
12+
jobs:
13+
commit-to-other-repo:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout the source branch here
17+
uses: actions/checkout@v6
18+
with:
19+
ref: src
20+
21+
- name: Checkout the destination branch in a folder
22+
uses: actions/checkout@v6
23+
with:
24+
ref: main
25+
path: target-repo
26+
27+
- name: Copy html files
28+
run: |
29+
rm -r ./target-repo/*
30+
cp -r ./src/*.html ./src/*.js ./target-repo/
31+
32+
mkdir ./target-repo/assets
33+
cp -r ./assets/* ./target-repo/assets
34+
35+
36+
- name: install pandoc
37+
uses: pandoc/actions/setup@v1
38+
with:
39+
version: '3.5'
40+
41+
- name: Convert all Markdown files to HTML
42+
run: |
43+
mkdir -p ./target-repo/tech_blog
44+
for file in $(find ./src/tech_blog/ -name "*.md"); do
45+
out="./target-repo/tech_blog/$(basename "${file%.md}.html")"
46+
pandoc "$file" -o "$out"
47+
done
48+
49+
mkdir -p ./target-repo/bike_blog
50+
for file in $(find ./src/bike_blog/ -name "*.md"); do
51+
out="./target-repo/bike_blog/$(basename "${file%.md}.html")"
52+
pandoc "$file" -o "$out"
53+
done
54+
55+
56+
- name: Commit and push changes
57+
run: |
58+
cd target-repo
59+
git config user.name "github-actions[bot]"
60+
git config user.email "github-actions[bot]@users.noreply.github.com"
61+
git add --all
62+
git commit -m "Automated build from blog source"
63+
git push

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
This is the site for my public blogs, but I have no idea what I am going to do with them
2+
3+
Use pandoc to convert md to html
4+
Populate the templates when you get a blog post

assets/4/end.png

522 KB
Loading

assets/4/fake_route_3.png

998 KB
Loading

assets/4/real_route_3.png

979 KB
Loading

assets/4/route_1.png

957 KB
Loading

assets/4/route_2.png

929 KB
Loading

assets/4/start.png

628 KB
Loading

assets/6/broke_chain_1.jpg

664 KB
Loading

assets/6/broke_chain_2.jpg

409 KB
Loading

0 commit comments

Comments
 (0)