Skip to content

Commit 97875f9

Browse files
committed
add workflow
1 parent 203780c commit 97875f9

File tree

73 files changed

+23703
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+23703
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish to gh-pages branch
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
name: Build and Push
10+
steps:
11+
- name: Checkout main
12+
uses: actions/checkout@v3
13+
with:
14+
ref: main
15+
path: clone-path
16+
17+
- name: Install dependencies and run build
18+
run: |
19+
cd ${{ github.workspace }}
20+
pip install --upgrade pip
21+
pip install git+https://github.com/obsidian-html/obsidian-html
22+
obsidianhtml convert -i clone-path/config.yaml -v
23+
touch html/.nojekyll
24+
25+
- name: Publish to Github Pages
26+
uses: s0/git-publish-subdir-action@develop
27+
env:
28+
REPO: self
29+
BRANCH: gh-pages # The branch name where you want to push the assets
30+
FOLDER: html # The directory where your assets are generated
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub will automatically add this - you don't need to bother getting a token
32+
MESSAGE: "Build: ({sha}) {msg}" # The commit message

config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# The first folder that contains all obsidian files
2+
# Use full path or relative path, but don't use ~/
3+
obsidian_folder_path_str: 'Notes'
4+
5+
# The note that will be used as the index.html
6+
# should be in obsidian_folder_path_str
7+
# Use full path or relative path, but don't use ~/
8+
obsidian_entrypoint_path_str: 'Notes/Изучение rust.md'

0 commit comments

Comments
 (0)