Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI to docs + Password protect pages #287

Merged
merged 4 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/docs-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: docs-ci
on:
push:
branches:
- master
Avantol13 marked this conversation as resolved.
Show resolved Hide resolved
- main
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
Avantol13 marked this conversation as resolved.
Show resolved Hide resolved
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material mkdocs-encryptcontent-plugin mkdocs-video
- run: cd gen3 && mkdocs gh-deploy --force
18 changes: 11 additions & 7 deletions gen3/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,13 @@ theme:
favicon: img/Gen3-3.ico
logo: img/gen3_new_logo_white.svg
name: material
features:
- navigation.footer
- navigation.indexes
- navigation.tracking
- navigation.path
custom_dir: overrides

palette:
- primary: black

Expand All @@ -96,11 +102,8 @@ theme:
toggle:
icon: material/eye-outline
name: Switch to light mode
features:
- navigation.footer
- navigation.indexes
- navigation.tracking
- navigation.path
extra_css:
- stylesheets/extra.css
use_directory_urls: true
markdown_extensions:
- admonition
Expand All @@ -122,8 +125,9 @@ plugins:
blog_toc: true
- mkdocs-video:
is_video: True
extra_css:
- stylesheets/extra.css
- encryptcontent:
password_inventory:
_global: 'gen3'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realize this isn't necessarily intended to be secure, but having this plain text sorta defeats the purpose of trying to hide the content on the branches. I think this needs to be a real Github secret

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just so that random people don't run into it for now, until we're ready to publish.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah but the repo is public so anyone can see this. So long as it's well understood that this isn't actually protecting against anything and folks writing the documentation understand that this does not actually prevent anyone from seeing the content, then it's okay. But configuring a secret on the repo and using that as a var here isn't too complicated and would alleviate my concern entirely

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the intention behind this password is for crawlers not to index this page, not to hide the content from the public.

extra:
social:
- icon: fontawesome/brands/linkedin
Expand Down
Loading