You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26-26Lines changed: 26 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
## **Code Embedder**
6
6
Seamlessly update code snippets in your **README** files! 🔄📝🚀
7
7
8
-
[Description](#-description) • [How it works](#-how-it-works) • [Examples](#-examples) • [Setup](#-setup) • [Under the hood](#-under-the-hood)
8
+
[Description](#-description) • [How it works](#-how-it-works) • [Setup](#-setup) • [Examples](#-examples) • [Under the hood](#-under-the-hood)
9
9
</div>
10
10
11
11
@@ -59,6 +59,31 @@ In the `README` (or other markdown) file, the object of the script is marked wit
59
59
> [!Note]
60
60
> If there is a section with the same name as any object, the object definition will be used in the `README` instead of the section. To avoid this, **use unique names for sections and objects!**
61
61
62
+
## 🔧 Setup
63
+
To use this action, you need to configure a yaml workflow file in `.github/workflows` folder (e.g. `.github/workflows/code-embedder.yaml`) with the following content:
64
+
65
+
```yaml
66
+
name: Code Embedder
67
+
68
+
on: pull_request
69
+
70
+
permissions:
71
+
contents: write
72
+
73
+
jobs:
74
+
code_embedder:
75
+
name: "Code embedder"
76
+
runs-on: ubuntu-latest
77
+
steps:
78
+
- name: Checkout
79
+
uses: actions/checkout@v3
80
+
81
+
- name: Run code embedder
82
+
uses: kvankova/code-embedder@v0.4.0
83
+
env:
84
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
85
+
86
+
```
62
87
63
88
## 💡 Examples
64
89
@@ -183,31 +208,6 @@ class Person:
183
208
184
209
With any changes to the function `print_hello` or class `Person` in `main.py`, the code block sections are updated in the `README` file with the next workflow run.
185
210
186
-
## 🔧 Setup
187
-
To use this action, you need to configure a yaml workflow file in `.github/workflows` folder (e.g. `.github/workflows/code-embedder.yaml`) with the following content:
0 commit comments