Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Add embed code action #4

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 7 additions & 1 deletion .github/workflows/rdme-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
6 changes: 1 addition & 5 deletions docs/test_snippets_sync_from_github.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions src/sample.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import Foundation

// some swift code here
class Foo {
let bar: Bar
}