Skip to content

Commit

Permalink
Merge pull request #201 from tryolabs/versioned-docs
Browse files Browse the repository at this point in the history
Documentation site for different Norfair versions
  • Loading branch information
javiber authored Oct 11, 2022
2 parents 4790f98 + b117420 commit 1e42a8f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 29 deletions.
33 changes: 10 additions & 23 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,9 @@ on:
# Runs on pushes targeting the default branch
push:
branches: ["master"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "docs"
Expand All @@ -23,28 +16,22 @@ concurrency:
jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python 3.7
uses: actions/setup-python@v4
with:
python-version: "3.7"
- name: Setup MKDocs
- name: Setup a user for the commits
run: |
git config user.name ci-bot
git config user.email [email protected]
- name: Installing dependencies
run: pip install -r docs/requirements.txt
- name: Build Docs
run: mkdocs build -d docs_site
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload entire repository
path: "docs_site"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
- name: Updating "dev"
run: mike deploy --push dev

10 changes: 5 additions & 5 deletions docs/css/custom.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:root > * {
--md-primary-fg-color: #0B0723;
}
:root>* {
--md-primary-fg-color: #0B0723;
}

.md-header__topic{
.md-header__topic>.md-ellipsis {
opacity: 0;
}
}
3 changes: 2 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
mkdocs-material==8.4.1
mkdocstrings[python]==0.19.0
mkdocs-autorefs==0.4.1
mkdocs-gen-files==0.4.0
mkdocs-gen-files==0.4.0
mike==1.1.2
7 changes: 7 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ plugins:
- gen-files:
scripts:
- docs/gen_index.py
- mike:
version_selector: true

extra:
version:
provider: mike
default: latest

markdown_extensions:
- toc:
Expand Down

0 comments on commit 1e42a8f

Please sign in to comment.