Skip to content

Commit fd3cc64

Browse files
committed
docs: Update README
1 parent 69cbba4 commit fd3cc64

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

README.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
## **Code Embedder**
66
Seamlessly update code snippets in your **README** files! 🔄📝🚀
77

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)
99
</div>
1010

1111

@@ -59,6 +59,31 @@ In the `README` (or other markdown) file, the object of the script is marked wit
5959
> [!Note]
6060
> 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!**
6161
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+
```
6287

6388
## 💡 Examples
6489

@@ -183,31 +208,6 @@ class Person:
183208

184209
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.
185210

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:
188-
189-
```yaml
190-
name: Code Embedder
191-
192-
on: pull_request
193-
194-
permissions:
195-
contents: write
196-
197-
jobs:
198-
code_embedder:
199-
name: "Code embedder"
200-
runs-on: ubuntu-latest
201-
steps:
202-
- name: Checkout
203-
uses: actions/checkout@v3
204-
205-
- name: Run code embedder
206-
uses: kvankova/code-embedder@v0.4.0
207-
env:
208-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
209-
210-
```
211211

212212
## 🔬 Under the hood
213213
This action performs the following steps:

0 commit comments

Comments
 (0)