Skip to content

Commit c16a278

Browse files
authored
Create trigger_netlify_build.yml
feat: integrate external cpp-notes repo via Netlify build This commit integrates content from the separate 'cpp-notes' repository into the portfolio website during the Netlify build process. Key changes: - **netlify.toml:** Modified the Netlify build command (`[build].command`) to: 1. Clone the public 'cpp-notes' repository (https://github.com/dev-ai-kar/cpp-notes.git) into a '_cpp_notes' directory within the build environment. 2. Execute the standard 'bundle exec jekyll build' command afterwards. This ensures the notes are available for Jekyll processing during each Netlify build. - **_config.yml:** Added '_cpp_notes' to the 'collections' configuration. - Set 'output: true' to generate individual HTML pages for each note. - Defined the permalink structure as '/notes/cpp/:path.html' for the generated note pages. This setup allows notes maintained in the 'cpp-notes' repository to be automatically pulled in and published as part of the main portfolio site whenever a Netlify build is triggered (e.g., by a push to this repo or via the build hook triggered by the 'cpp-notes' repo workflow).
1 parent 2cf549b commit c16a278

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Trigger Netlify Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Trigger on push to the 'main' branch of cpp-notes
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Trigger Netlify Build Hook
13+
run: curl -X POST -d '{}' ${{ secrets.NETLIFY_BUILD_HOOK_URL }}

0 commit comments

Comments
 (0)