Skip to content

Commit 225c030

Browse files
committed
adding step for gh-pages
1 parent b43b9e1 commit 225c030

3 files changed

Lines changed: 27 additions & 3 deletions

File tree

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,18 @@ poetry run mkdocs serve
8888
```
8989
This will build the documentation and create a local view of the page to visualize in our browser.
9090

91-
TO deploy the the page to Github branch with the documentation we do
91+
92+
Additionally, we need to give permission to GitHub to deploy the website from the repository branch.
93+
We do this by going to the configuration's page of the repository and in the "Pages" tab on the left
94+
we update the source to "Deploy from a branch" and change the branch to "gh-pages" in the "/root" directory.
95+
To deploy the the page to Github branch with the documentation we do
9296
```
9397
poetry run mkdocs gh-deploy
9498
```
9599
this will create the website [https://jorgemarpa.github.io/repo-template/](https://jorgemarpa.github.io/repo-template/) which has the documentation we have created.
96100

101+
As an extra step, we can add a quick link to the repo page in the "About" section of the landing page of our repository.
102+
97103

98104
## Pytest
99105

@@ -107,6 +113,7 @@ poetry run pytest -v tests
107113
This are automatic actions that happens during pushing new commits and/or pull request. We can configure these actions in a `yaml` file in the `.github/workflows` directory. These actions automatize most of the routine steps described in this document.
108114

109115
In this template we have the following workflows:
116+
110117
- `ruff`: does code formatting, lint, and sorting. It replaces `flake8`, `isort`, and `black`.
111118
- `deploy-mkdocs`: creates documentation page from with Mkdocs.
112119
- `pytest`: runs python test

docs/index.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,18 @@ poetry run mkdocs serve
8888
```
8989
This will build the documentation and create a local view of the page to visualize in our browser.
9090

91-
TO deploy the the page to Github branch with the documentation we do
91+
92+
Additionally, we need to give permission to GitHub to deploy the website from the repository branch.
93+
We do this by going to the configuration's page of the repository and in the "Pages" tab on the left
94+
we update the source to "Deploy from a branch" and change the branch to "gh-pages" in the "/root" directory.
95+
To deploy the the page to Github branch with the documentation we do
9296
```
9397
poetry run mkdocs gh-deploy
9498
```
9599
this will create the website [https://jorgemarpa.github.io/repo-template/](https://jorgemarpa.github.io/repo-template/) which has the documentation we have created.
96100

101+
As an extra step, we can add a quick link to the repo page in the "About" section of the landing page of our repository.
102+
97103

98104
## Pytest
99105

@@ -107,6 +113,7 @@ poetry run pytest -v tests
107113
This are automatic actions that happens during pushing new commits and/or pull request. We can configure these actions in a `yaml` file in the `.github/workflows` directory. These actions automatize most of the routine steps described in this document.
108114

109115
In this template we have the following workflows:
116+
110117
- `ruff`: does code formatting, lint, and sorting. It replaces `flake8`, `isort`, and `black`.
111118
- `deploy-mkdocs`: creates documentation page from with Mkdocs.
112119
- `pytest`: runs python test

mkdocs.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ theme:
2424
- navigation.footer
2525
- header.autohide
2626
- navigation.tabs
27+
- content.code.copy
2728

2829
palette:
2930

@@ -67,4 +68,13 @@ plugins:
6768
show_root_heading: true
6869
show_source: false
6970
watch:
70-
- src/repo_template
71+
- src/repo_template
72+
73+
markdown_extensions:
74+
- pymdownx.highlight:
75+
anchor_linenums: true
76+
line_spans: __span
77+
pygments_lang_class: true
78+
- pymdownx.inlinehilite
79+
- pymdownx.snippets
80+
- pymdownx.superfences

0 commit comments

Comments
 (0)