Skip to content

Commit f5e42a8

Browse files
Potential fix for code scanning alert no. 18: Workflow does not contain permissions
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent d611b69 commit f5e42a8

10 files changed

Lines changed: 88 additions & 32 deletions

File tree

.github/workflows/docs.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Build GitHub Pages
2+
on:
3+
push:
4+
branches:
5+
- master
6+
paths:
7+
- 'docs/**'
8+
- mkdocs.yml
9+
workflow_dispatch:
10+
permissions:
11+
contents: write
12+
pages: write
13+
id-token: write
14+
15+
jobs:
16+
build_mkdocs:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
- uses: actions/setup-python@v5
25+
with:
26+
python-version: 3.12
27+
- name: Install requirements
28+
run: sudo apt update && sudo apt install --yes libev-dev
29+
- name: Install uv
30+
uses: astral-sh/setup-uv@v7
31+
- name: Install tox-uv
32+
run: uv tool install tox --with tox-uv
33+
- name: Deploy docs to GitHub Pages
34+
run: tox -e docs-deploy
35+
36+
deploy_mkdocs:
37+
needs: build_mkdocs
38+
environment:
39+
name: github-pages
40+
url: ${{ steps.deployment.outputs.page_url }}
41+
runs-on: ubuntu-latest
42+
steps:
43+
- name: Checkout
44+
uses: actions/checkout@v4
45+
with:
46+
ref: gh-pages
47+
- name: Setup Pages
48+
uses: actions/configure-pages@v5
49+
- name: Upload artifact
50+
uses: actions/upload-pages-artifact@v3
51+
with:
52+
path: '.'
53+
- name: Deploy to GitHub Pages
54+
id: deployment
55+
uses: actions/deploy-pages@v4

.github/workflows/markdownlint.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
name: Markdown Lint
22
description: Lint Markdown files
33

4-
on: [push, pull_request]
4+
on:
5+
push:
6+
branches:
7+
- master
8+
paths:
9+
- 'docs/**'
10+
- mkdocs.yml
511

612
jobs:
713
lint:
@@ -19,4 +25,4 @@ jobs:
1925
if: steps.changed-files.outputs.any_changed == 'true'
2026
with:
2127
globs: ${{ steps.changed-files.outputs.all_changed_files }}
22-
separator: ","
28+
separator: ","

.markdownlint.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ MD029:
7878
MD030:
7979
ul_single: 1
8080
ol_single: 1
81-
ul_multi: 3
82-
ol_multi: 2
81+
ul_multi: 1
82+
ol_multi: 1
8383

8484
# MD031/blanks-around-fences : Fenced code blocks should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md031.md
8585
MD031: true

docs/element_manager/service.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ The main service entity that manages:
8080

8181
Services can define dependencies that run before or after the main service:
8282

83-
- **CmdShell**: Execute a shell command
83+
- **CmdShell**: Execute a shell command
8484
- `command`: The shell command to execute
85-
- **ServiceTarget** (TBD): Reference another service for ordering (currently disabled, service relationships are being reworked)
85+
- **ServiceTarget** (TBD): Reference another service for ordering (currently disabled, service relationships are being reworked)
8686

8787
## API Structure
8888

docs/faq.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,13 @@ export HS256_KEY="secret"
7272
## 🔗 Related projects
7373

7474
- Genesis SDK is a set of tools for developing Genesis elements. You can find it [here](https://github.com/infraguys/gcl_sdk).
75-
- Genesis DevTools it's a set oftools to manager life cycle of genesis projects. You can find it [here](https://github.com/infraguys/genesis_devtools).
75+
- Genesis DevTools it's a set of tools to manager life cycle of genesis projects. You can find it [here](https://github.com/infraguys/genesis_devtools).
7676

7777
## 💡 Contributing
7878

7979
Contributing to the project is highly appreciated! However, some rules should be followed for successful inclusion of new changes in the project:
8080

8181
- All changes should be done in a separate branch.
8282
- Changes should include not only new functionality or bug fixes, but also tests for the new code.
83-
- After the changes are completed and **tested**, a Pull Request should be created with a clear description of the new functionality. And add one of the project maintainers as a reviewer.
83+
- After the changes are completed and **tested**, a Pull Request should be created with a clear description of the new functionality. Add one of the project maintainers as a reviewer.
8484
- Changes can be merged only after receiving an approve from one of the project maintainers.

docs/network/load_balancer.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ The Load Balancer service provides a REST-based API for creating and managing lo
5050

5151
The main load balancer entity that manages:
5252

53-
- Status (NEW, IN_PROGRESS, ACTIVE, ERROR)
54-
- IP addresses
55-
- Type configuration:
53+
- Status (NEW, IN_PROGRESS, ACTIVE, ERROR)
54+
- IP addresses
55+
- Type configuration:
5656
- `core` - VM-based LB
5757
- `core_agent` - LB will be run on genesis_core instance itself
5858

@@ -77,24 +77,24 @@ Backend pool that manages:
7777

7878
Routing rules that define how traffic is handled:
7979

80-
- Condition types
80+
- Condition types
8181
- `prefix` - nginx-like regex prefixes
8282
- `exact` - plain equal rule
8383
- `regex` - nginx-like regex
8484
- `raw` - used to set backend pools for L4
85-
- Actions
85+
- Actions
8686
- `backend` - send to backend
8787
- `redirect` - return http redirect
8888
- `local_dir` - serve static from local dir on LB
8989
- `local_dir_download` - download tar.gz/zstd on LB itself, unpack it and serve data from local dir
90-
- Modifiers (headers, rewrite rules)
91-
- `headers` - modify headers
92-
- `auto_header`:
90+
- Modifiers (headers, rewrite rules)
91+
- `headers` - modify headers
92+
- `auto_header`:
9393
- X-Forwarded-For
9494
- X-Forwarded-Port
9595
- X-Forwarded-Proto
9696
- X-Forwarded-Prefix
97-
- `set_header`: set static header
97+
- `set_header`: set static header
9898

9999
## API Structure
100100

@@ -136,10 +136,12 @@ Routing rules that define how traffic is handled:
136136
```
137137

138138
#### External sources requirements
139+
139140
##### SSH
140141

141142
Tested on Ubuntu 24, prepare remote system:
142-
```
143+
144+
```console
143145
# We may use nginx with proxy_protocol and socat for udp
144146
apt install nginx-full socat
145147

@@ -148,7 +150,6 @@ echo 'net.ipv4.ip_unprivileged_port_start=0' > /etc/sysctl.d/50-unprivileged-por
148150
sysctl --system
149151
```
150152

151-
152153
### Creating a Backend Pool
153154

154155
```json

docs/onepager.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

mkdocs.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,8 @@ markdown_extensions:
6969
alternate_style: true
7070

7171
nav:
72-
- Software:
73-
- Общее: index.md
74-
- Лендинг: onepager.md
72+
- Software: index.md
7573
- Network:
7674
- Load Balancer as a Service API: network/load_balancer.md
7775
- Service:
7876
- Service as a Service API: element_manager/service.md
79-
- FAQ: faq.md

tox.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ extras =
5959
runner = uv-venv-lock-runner
6060
commands = mkdocs serve --dev-addr 0.0.0.0:8181 --livereload
6161

62+
[testenv:docs-deploy]
63+
extras =
64+
docs
65+
runner = uv-venv-lock-runner
66+
commands = mkdocs gh-deploy --force
67+
6268
[testenv:develop]
6369
runner = uv-venv-lock-runner
6470
extras =

0 commit comments

Comments
 (0)