Auto-update blog content from Obsidian: 2025-05-26 18:02:57
All checks were successful
Deploy / Deploy (push) Successful in 4s

This commit is contained in:
Gitea Actions
2025-05-26 18:02:57 +00:00
parent b3f4e15a36
commit 7d2e62a55c
17 changed files with 72 additions and 54 deletions

View File

@@ -95,18 +95,17 @@ container:
```
The runner appears in the `Administration Area`, under `Actions`>`Runners`. To obtain the registration token, click on the `Create new Runner` button
![New runner visible in Gitea](img/gitea-runners-management.png)
![Pasted_image_20250502230954.png](img/Pasted_image_20250502230954.png)
### Step 3: Set up Gitea Actions for Obsidian Repository
First I enabled the Gitea Actions, this is disabled by default, tick the box `Enable Repository Actions` in the settings for that repository
I created a new PAT (Personal Access Token) with RW permission on the repositories
![New personal access token creation in Gitea](img/gitea-new-pat.png)
![Pasted_image_20250501235521.png](img/Pasted_image_20250501235521.png)
I added this token as secret `REPO_TOKEN` in the repository
![Add secret window for repository in Gitea](img/gitea-add-repo-secret.png)
![Pasted_image_20250501235427.png](img/Pasted_image_20250501235427.png)
I needed to create the workflow that will spin-up a container and do the following:
1. When I push new/updated files in the `Blog` folder
@@ -165,7 +164,7 @@ jobs:
git push -u origin main
```
Obsidian uses wiki-style links for images, like `![[image name.png]]`, which isn't compatible with Hugo out of the box. Here's how I automated a workaround in a Gitea Actions workflow:
Obsidian uses wiki-style links for images, like `![image_name.png](img/image_name.png)`, which isn't compatible with Hugo out of the box. Here's how I automated a workaround in a Gitea Actions workflow:
- I find all used image references in `.md` files.
- For each referenced image, I update the link in relevant `.md` files like `![image name](img/image_name.png)`.
- I then copy those used images to the blog's static directory while replacing white-spaces by underscores.