Skip to content
Open

Main #25

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
126e2a5
trigger
weijie-chen Jun 21, 2024
4b8ebd7
change to master
weijie-chen Jun 21, 2024
01e7e87
change
weijie-chen Jun 21, 2024
5f51507
init
weijie-chen Jun 21, 2024
2ab7929
change folder
weijie-chen Jul 20, 2024
b5b238f
update
weijie-chen Aug 3, 2024
b4383ef
overhaul
weijie-chen Aug 5, 2024
da5f1d1
update workflow
weijie-chen Aug 5, 2024
6b5bd27
trigger workflow
weijie-chen Aug 5, 2024
88d1919
Update README date and links
invalid-email-address Aug 5, 2024
cbb135a
change link name
weijie-chen Aug 5, 2024
63c3032
Merge branch 'master' of https://github.com/weijie-chen/Linear-Algebr…
weijie-chen Aug 5, 2024
6e8337e
Update README date and links
invalid-email-address Aug 5, 2024
66c10aa
fix
weijie-chen Aug 5, 2024
54d85a8
Merge branch 'master' of https://github.com/weijie-chen/Linear-Algebr…
weijie-chen Aug 5, 2024
898487b
Update README date and links
invalid-email-address Aug 5, 2024
b5a32c4
Update README.md
weijie-chen Aug 5, 2024
531edbd
remove unused library
weijie-chen Aug 7, 2024
c459110
Merge branch 'master' of https://github.com/weijie-chen/Linear-Algebr…
weijie-chen Aug 7, 2024
000f03d
resume
weijie-chen Aug 8, 2024
46d5b70
index
weijie-chen Aug 8, 2024
89de000
index again
weijie-chen Aug 8, 2024
1b0578e
Update LICENSE
weijie-chen Aug 8, 2024
251b764
template of complex analyasis
weijie-chen Aug 9, 2024
bfc569a
add cover perlin noise ball
weijie-chen Aug 12, 2024
d9d32b4
change
weijie-chen Aug 12, 2024
037b182
css update
weijie-chen Aug 14, 2024
41b65c5
work flow to convert ipynb to qmd
weijie-chen Aug 14, 2024
dd5201f
update readme script
weijie-chen Aug 14, 2024
f5762e7
update readme
weijie-chen Aug 15, 2024
7b55090
python version
weijie-chen Aug 15, 2024
26f59ee
trigger convert
weijie-chen Aug 15, 2024
1363fe3
convert fix
weijie-chen Aug 15, 2024
d9b2eeb
qmd trigger
weijie-chen Aug 15, 2024
5e65810
try again
weijie-chen Aug 15, 2024
0ddf436
convert location
weijie-chen Aug 15, 2024
d339fa6
add PAT
weijie-chen Aug 15, 2024
5cc113a
trigger
weijie-chen Aug 15, 2024
c500982
change
weijie-chen Aug 15, 2024
7648e96
test
weijie-chen Aug 15, 2024
614780e
try again
weijie-chen Aug 15, 2024
b0eda8f
test
weijie-chen Aug 16, 2024
20b5780
local main
weijie-chen Aug 16, 2024
5da9941
trigger
weijie-chen Aug 16, 2024
f50f9ac
1
weijie-chen Aug 16, 2024
cbb1afa
test
weijie-chen Aug 16, 2024
8949495
git push origin main:master
weijie-chen Aug 16, 2024
d2c80f7
test
weijie-chen Aug 16, 2024
3e5e594
test
weijie-chen Aug 16, 2024
823124f
test
weijie-chen Aug 16, 2024
eaca70b
test
weijie-chen Aug 16, 2024
e265898
test
weijie-chen Aug 16, 2024
66bb75f
test
weijie-chen Aug 16, 2024
025d76c
test
weijie-chen Aug 16, 2024
fd86cf0
ts
weijie-chen Aug 16, 2024
165299b
tests
weijie-chen Aug 16, 2024
1c835e4
test
weijie-chen Aug 16, 2024
49a7157
test
weijie-chen Aug 16, 2024
3c6127a
test
weijie-chen Aug 16, 2024
a3fc2bf
test
weijie-chen Aug 16, 2024
05c706a
Update README.md
weijie-chen Sep 5, 2024
683d6d7
update link routing
weijie-chen Sep 5, 2024
6ca57dd
Merge branch 'master' of https://github.com/weijie-chen/Linear-Algebr…
weijie-chen Sep 5, 2024
15d36d8
Update README.md
weijie-chen Sep 5, 2024
131fc1e
Update README.md
weijie-chen Sep 5, 2024
37e768c
fix readme links
weijie-chen Sep 5, 2024
4482c57
fix path
weijie-chen Sep 5, 2024
3e7eb8f
fix
weijie-chen Sep 5, 2024
c6d61e3
add br
weijie-chen Sep 5, 2024
2751f9c
Added CONTRIBUTION.md file with my notes
manishaa075 Aug 24, 2025
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
63 changes: 0 additions & 63 deletions .github/workflows/convert-and-publish.yml

This file was deleted.

93 changes: 93 additions & 0 deletions .github/workflows/convert-to-qmd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Convert Notebooks and Update Book

on:
push:
paths:
- 'notebooks/**.ipynb'

jobs:
convert-and-copy:
runs-on: ubuntu-latest

permissions:
contents: write # Ensure the job has write permissions
issues: write # Required for API calls to create and delete deploy keys

steps:
- name: Checkout the Linear_Algebra_with_Python repository
uses: actions/checkout@v4.1.7

- name: Install Quarto
run: |
wget https://github.com/quarto-dev/quarto-cli/releases/download/v1.5.56/quarto-1.5.56-linux-amd64.tar.gz
tar -xvzf quarto-1.5.56-linux-amd64.tar.gz
sudo cp -r quarto-1.5.56/* /usr/local/

- name: Convert Notebooks to QMD
run: |
mkdir -p converted_chapters
for notebook in notebooks/*.ipynb; do
quarto convert "$notebook" -o "converted_chapters/$(basename "$notebook" .ipynb).qmd"
done

- name: Generate SSH Key
run: |
ssh-keygen -t rsa -b 4096 -C "actions@github.com" -f /tmp/github_actions -N ""
echo "::set-output name=ssh-public-key::$(cat /tmp/github_actions.pub)"

- name: Add SSH Key to the SSH Agent
run: |
eval "$(ssh-agent -s)"
ssh-add /tmp/github_actions

- name: Debug SSH Key
run: ssh-add -l


- name: Add Deploy Key to GitHub
id: add_deploy_key
run: |
curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/weijie-chen/weijie-chen.github.io/keys \
-d "{\"title\":\"GitHub Actions Key\",\"key\":\"$(cat /tmp/github_actions.pub)\",\"read_only\":false}" \
-o deploy_key.json
echo "::set-output name=deploy-key-id::$(jq -r .id deploy_key.json)"

- name: Checkout the weijie-chen.github.io repository
uses: actions/checkout@v4.1.7
with:
repository: weijie-chen/weijie-chen.github.io
path: book_repo
ssh-key: /tmp/github_actions # Use the dynamically generated SSH key

- name: Copy Converted QMD Files to Book Repository
run: |
mkdir -p book_repo/linear-algebra-with-python-book/chapters
cp converted_chapters/*.qmd book_repo/linear-algebra-with-python-book/chapters/

- name: Update Table of Contents in index.html
run: |
toc=""
for chapter in book_repo/linear-algebra-with-python-book/chapters/*.qmd; do
chapter_name=$(basename "$chapter" .qmd)
toc="$toc<li>$chapter_name</li>\n"
done
sed -i '/<section class="table-of-contents">/,/<\/section>/{//!d}' book_repo/linear-algebra-with-python-book/index.html
sed -i "/<section class=\"table-of-contents\">/a $toc" book_repo/linear-algebra-with-python-book/index.html

- name: Commit and Push Changes via SSH
run: |
cd book_repo
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git add linear-algebra-with-python-book/chapters/*
git add linear-algebra-with-python-book/index.html
git commit -m "Updated chapters and Table of Contents"
git push git@github.com:weijie-chen/weijie-chen.github.io.git main

- name: Clean Up - Remove Deploy Key from GitHub
run: |
DEPLOY_KEY_ID=$(jq -r .id deploy_key.json)
curl -X DELETE -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
https://api.github.com/repos/weijie-chen/weijie-chen.github.io/keys/$DEPLOY_KEY_ID
63 changes: 0 additions & 63 deletions .github/workflows/main.yml

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/update-readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Update README

on:
push:
branches:
- master # This repo is using 'master' as the main branch name

jobs:
update-readme:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4.1.7

- name: Setup Python
uses: actions/setup-python@v5.1.1
with:
python-version: 3.12

- name: Install dependencies
run: pip install pyyaml

- name: Update README.md
run: python scripts/update_readme.py

- name: Check if README.md has changed
id: readme_diff
run: |
git diff README.md || echo "README_CHANGED=true" >> $GITHUB_ENV

- name: Commit and push changes
if: env.README_CHANGED == 'true'
run: |
git config --global user.name 'github-actions'
git config --global user.email 'github-actions@github.com'
git add README.md
git commit -m "Update README date and links"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions CONTRIBUTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"# My Contribution"
Loading