Skip to content

Commit 06db94c

Browse files
authored
Merge pull request #13 from ZPascal/update-github-action
Update the Github Action
2 parents b430d22 + 136b8fe commit 06db94c

File tree

4 files changed

+20
-21
lines changed

4 files changed

+20
-21
lines changed

.github/workflows/pull-request-checks.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -87,29 +87,29 @@ jobs:
8787
hide-badge: true
8888
create-new-commit: true
8989

90-
- name: "Check if coverage badge file existence"
91-
id: check_files
92-
uses: andstor/file-existence-action@v1
93-
with:
94-
files: "docs/coverage.svg"
95-
9690
- name: Generate coverage badge
97-
if: steps.check_files.outputs.files_exists == 'false'
98-
run: coverage-badge -o docs/coverage.svg -f
91+
run: coverage-badge -f -o docs/coverage.svg
9992

10093
- name: Generate documentation
10194
run: pydoc-markdown --render-toc && rm -rf docs/content && mv build/docs/* docs
10295

96+
- name: Check changed files
97+
uses: tj-actions/[email protected]
98+
id: verify-changed-files
99+
with:
100+
files: |
101+
docs
102+
103103
- name: Commit files
104-
if: steps.check_files.outputs.files_exists == 'false'
104+
if: steps.verify-changed-files.outputs.files_changed == 'true'
105105
run: |
106106
git config --local user.email "github-actions[bot]@users.noreply.github.com"
107107
git config --local user.name "github-actions[bot]"
108108
git add --force docs
109109
git commit -m "Add coverage badge and documentation"
110110
111111
- name: Push changes
112-
if: steps.check_files.outputs.files_exists == 'false'
112+
if: steps.verify-changed-files.outputs.files_changed == 'true'
113113
uses: ad-m/github-push-action@master
114114
with:
115115
github_token: ${{ secrets.GITHUB_TOKEN }}

docs/content/grafana_dashboard_templater/dashboard.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,22 @@ The class includes all necessary methods to template the selected dashboard and
3333
#### get\_dashboard\_json
3434

3535
```python
36-
def get_dashboard_json(template_values: dict) -> dict
36+
def get_dashboard_json(template_values: Dict) -> Dict
3737
```
3838

39-
The method includes a functionality to template the selected dashboard and return the corresponding dashboard
40-
as dictionary
39+
The method includes a functionality to template the selected dashboard and return the corresponding dashboard as dictionary
4140

4241
**Arguments**:
4342

44-
- `template_values` _dict_ - Specify the inserted templating values as dict
43+
- `template_values` _Dict_ - Specify the inserted templating values as dict
4544

4645

4746
**Raises**:
4847

49-
- `Exception` - Unspecified error by executing the functionality
48+
- `jinja2.TemplateNotFound` - Jinja2 template not found
5049

5150

5251
**Returns**:
5352

54-
- `json_dashboard` _dict_ - Returns the dashboard as dict
53+
- `json_dashboard` _Dict_ - Returns the dashboard as dict
5554

docs/coverage.svg

Lines changed: 3 additions & 3 deletions
Loading

docs/mkdocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
docs_dir: content
22
nav:
33
- Home: index.md
4-
- Grafana Dashboard Templater Documentation:
4+
- Grafana Dashboard Templater:
55
- Model: grafana_dashboard_templater/model.md
66
- Dashboard: grafana_dashboard_templater/dashboard.md
77
repo_url: https://github.com/ZPascal/grafana_dashboard_templater
88
site_name: Grafana Dashboard Templater
9-
theme: readthedocs
9+
theme: material

0 commit comments

Comments
 (0)