Skip to content

Commit

Permalink
Merge pull request #13 from ZPascal/update-github-action
Browse files Browse the repository at this point in the history
Update the Github Action
  • Loading branch information
ZPascal authored Sep 16, 2022
2 parents b430d22 + 136b8fe commit 06db94c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 21 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/pull-request-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,29 +87,29 @@ jobs:
hide-badge: true
create-new-commit: true

- name: "Check if coverage badge file existence"
id: check_files
uses: andstor/file-existence-action@v1
with:
files: "docs/coverage.svg"

- name: Generate coverage badge
if: steps.check_files.outputs.files_exists == 'false'
run: coverage-badge -o docs/coverage.svg -f
run: coverage-badge -f -o docs/coverage.svg

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

- name: Check changed files
uses: tj-actions/[email protected]
id: verify-changed-files
with:
files: |
docs
- name: Commit files
if: steps.check_files.outputs.files_exists == 'false'
if: steps.verify-changed-files.outputs.files_changed == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add --force docs
git commit -m "Add coverage badge and documentation"
- name: Push changes
if: steps.check_files.outputs.files_exists == 'false'
if: steps.verify-changed-files.outputs.files_changed == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
11 changes: 5 additions & 6 deletions docs/content/grafana_dashboard_templater/dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,22 @@ The class includes all necessary methods to template the selected dashboard and
#### get\_dashboard\_json

```python
def get_dashboard_json(template_values: dict) -> dict
def get_dashboard_json(template_values: Dict) -> Dict
```

The method includes a functionality to template the selected dashboard and return the corresponding dashboard
as dictionary
The method includes a functionality to template the selected dashboard and return the corresponding dashboard as dictionary

**Arguments**:

- `template_values` _dict_ - Specify the inserted templating values as dict
- `template_values` _Dict_ - Specify the inserted templating values as dict


**Raises**:

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


**Returns**:

- `json_dashboard` _dict_ - Returns the dashboard as dict
- `json_dashboard` _Dict_ - Returns the dashboard as dict

6 changes: 3 additions & 3 deletions docs/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
docs_dir: content
nav:
- Home: index.md
- Grafana Dashboard Templater Documentation:
- Grafana Dashboard Templater:
- Model: grafana_dashboard_templater/model.md
- Dashboard: grafana_dashboard_templater/dashboard.md
repo_url: https://github.com/ZPascal/grafana_dashboard_templater
site_name: Grafana Dashboard Templater
theme: readthedocs
theme: material

0 comments on commit 06db94c

Please sign in to comment.