diff --git a/.github/workflows/rdme-docs.yml b/.github/workflows/rdme-docs.yml index 311860ef..0bc933c6 100644 --- a/.github/workflows/rdme-docs.yml +++ b/.github/workflows/rdme-docs.yml @@ -8,7 +8,7 @@ on: # This workflow will run every time you push code to the following branch: `main` # Check out GitHub's docs for more info on configuring this: # https://docs.github.com/actions/using-workflows/events-that-trigger-workflows - - main + - add-action-embed-code jobs: rdme-docs: @@ -17,6 +17,12 @@ jobs: - name: Check out repo 📚 uses: actions/checkout@v3 + - name: Markdown Embed Code From File + uses: tokusumi/markdown-embed-code@v1.0.0 + with: + token: ${{ secrets.REPO_TOKEN }} + markdown: "docs/test_snippets_sync_from_github.md" + - name: Run `docs` command 🚀 uses: readmeio/rdme@v8 with: diff --git a/docs/test_snippets_sync_from_github.md b/docs/test_snippets_sync_from_github.md index 6b57b73f..362eb445 100644 --- a/docs/test_snippets_sync_from_github.md +++ b/docs/test_snippets_sync_from_github.md @@ -9,12 +9,8 @@ hidden: true This was synced from GitHub actions when merging to main +```swift:../src/sample.py [4-6] -```swift -// some swift code here -class Foo { - let bar: Bar -} ``` ```kotlin // here goes the kotlin equivalent diff --git a/src/sample.swift b/src/sample.swift new file mode 100644 index 00000000..d44e5061 --- /dev/null +++ b/src/sample.swift @@ -0,0 +1,6 @@ +import Foundation + +// some swift code here +class Foo { + let bar: Bar +} \ No newline at end of file