Skip to content

Commit 41614ef

Browse files
committed
Merge branch 'main' of github.com:zebbra/neops
2 parents bf2e36a + 030db47 commit 41614ef

21 files changed

+284
-246
lines changed

.github/workflows/gh-pages.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
# Simple workflow for deploying static content to GitHub Pages
2-
name: Deploy static content to Pages
2+
name: Deploy Neops Documentation
33

44
on:
55
# Runs on pushes targeting the default branch
66
push:
77
branches: ["main"]
88

9-
# Allows you to run this workflow manually from the Actions tab
10-
workflow_dispatch:
9+
schedule:
10+
- cron: '0 */3 * * *' # Runs every 3 hours
1111

1212
repository_dispatch:
1313
types: [ trigger ] # You can specify a custom event type
1414

15+
# Allows you to run this workflow manually from the Actions tab
16+
workflow_dispatch:
17+
1518
permissions:
1619
contents: read
1720
pages: write

Dockerfile

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

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ include ./make_scripts/mkdocs-documentation/mkdocs-documentation-makefile.mk
22

33
update-submodules:
44
echo "Updating submodules"
5-
# git submodule init
6-
# git submodule update --remote
7-
# git submodule foreach 'git checkout main'
8-
# git submodule foreach 'git pull'
9-
#
5+
git submodule init
6+
git submodule foreach 'git fetch'
7+
git submodule foreach 'git checkout develop'
8+
git submodule foreach 'git pull'
9+

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@ This repository does not contain product code, but serves as an entry point for
1414
## Contribute to documentation
1515

1616
Everybody is welcome to contribute to the documentation!
17-

docs/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Neops product documentation
22

3+
[![Neops Documentation](https://github.com/zebbra/neops/actions/workflows/gh-pages.yml/badge.svg)](https://github.com/zebbra/neops/actions/workflows/gh-pages.yml)
4+
35
Neops represents a groundbreaking approach to network power that transcends traditional task automation.
46
It’s designed to enhance productivity, enabling you to focus on what you do best—your core competencies.
57
With Neops, you’ll experience a seamless integration of intelligent solutions that streamline operations

docs/scripts

Lines changed: 0 additions & 1 deletion
This file was deleted.

make_scripts/mkdocs-documentation/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ RUN pip install poetry
66

77
COPY . .
88

9-
RUN poetry --directory make_scripts/mkdocs-documentation/ install
9+
RUN poetry --project make_scripts/mkdocs-documentation/ install
1010

1111

1212
# We need the .git repository to get authors and last-modified dates
1313
COPY .git .git
1414

1515
RUN make doc-build
16+
RUN make doc-site-clean
1617

1718
FROM nginxinc/nginx-unprivileged:1.19
1819

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import os
2+
import pathspec
3+
4+
# Define the directory to clean and the ignore file (like .gitignore)
5+
directory_to_clean = 'site'
6+
ignore_file = f"{os.path.dirname(__file__)}/mkdocsignore" # Path to your ignore file
7+
8+
if __name__ == '__main__':
9+
# Read the patterns from the ignore file
10+
with open(ignore_file, 'r') as f:
11+
ignore_patterns = f.read().splitlines()
12+
13+
# Create a PathSpec object using the ignore patterns
14+
spec = pathspec.PathSpec.from_lines(pathspec.patterns.GitWildMatchPattern, ignore_patterns)
15+
16+
# Walk through the directory and delete files that match the ignore patterns
17+
for root, dirs, files in os.walk(directory_to_clean):
18+
for file in files:
19+
file_path = os.path.relpath(os.path.join(root, file), directory_to_clean)
20+
if spec.match_file(file_path): # Check if the file matches any ignore pattern
21+
print(f"Deleting {file_path}")
22+
os.remove(os.path.join(root, file))

make_scripts/mkdocs-documentation/docs_template/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ git submodule add your-repo-name
1717
1818
## Reference
1919
20-
- Markdown/Material for MkDocs: https://squidfunk.github.io/mkdocs-material/reference/
21-
- Snippets: https://facelessuser.github.io/pymdown-extensions/extensions/snippets/
20+
- [Markdown/Material for MkDocs](https://squidfunk.github.io/mkdocs-material/reference/)
21+
- [Usage of Snippets](https://facelessuser.github.io/pymdown-extensions/extensions/snippets/)
Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
.PHONY: doc-update-assets doc-create-mkdocs doc-serve doc-build
22

3+
MKDOCS_ENV=./make_scripts/mkdocs-documentation
4+
35
doc-update-assets:
4-
./make_scripts/mkdocs-documentation/setup_documentation.sh
6+
$(MKDOCS_ENV)/setup_documentation.sh
57

68
doc-create-mkdocs:
7-
poetry run --directory make_scripts/mkdocs-documentation/ python make_scripts/mkdocs-documentation/setup_documentation.py
9+
poetry run --project $(MKDOCS_ENV)/ python $(MKDOCS_ENV)/setup_documentation.py
810

911
doc-serve:
10-
poetry run --directory make_scripts/mkdocs-documentation/ python make_scripts/mkdocs-documentation/setup_documentation.py
11-
poetry run --directory make_scripts/mkdocs-documentation/ mkdocs serve
12+
poetry install --project $(MKDOCS_ENV)/
13+
poetry run --project $(MKDOCS_ENV)/ python $(MKDOCS_ENV)/setup_documentation.py
14+
poetry run --project $(MKDOCS_ENV)/ mkdocs serve
1215

1316
doc-build:
14-
poetry run --directory make_scripts/mkdocs-documentation/ python make_scripts/mkdocs-documentation/setup_documentation.py
15-
poetry run --directory make_scripts/mkdocs-documentation/ mkdocs build
17+
poetry run --project $(MKDOCS_ENV)/ python $(MKDOCS_ENV)/setup_documentation.py
18+
poetry run --project $(MKDOCS_ENV)/ mkdocs build
19+
poetry run --project $(MKDOCS_ENV)/ python $(MKDOCS_ENV)/clean_sites_directory.py
1620

1721
doc-build-docker:
18-
docker build --file make_scripts/mkdocs-documentation/Dockerfile .
22+
docker build --file $(MKDOCS_ENV)/Dockerfile .
1923

20-
#doc-build-strict:
21-
# poetry run --directory make_scripts/mkdocs-documentation/ python make_scripts/mkdocs-documentation/setup_documentation.py
22-
# poetry run --directory make_scripts/mkdocs-documentation/ mkdocs build --strict
24+
doc-site-clean:
25+
poetry run --project $(MKDOCS_ENV)/ python $(MKDOCS_ENV)/clean_sites_directory.py

0 commit comments

Comments
 (0)