From a930ce7e68df41e9f3f41bd5d77317a6ef7e2e12 Mon Sep 17 00:00:00 2001 From: Jawad Qureshi Date: Mon, 2 Dec 2024 11:45:27 -0600 Subject: [PATCH 1/2] Add CI to docs + Password protect pages --- .github/workflows/docs-ci.yaml | 29 +++++++++++++++++++++++++++++ gen3/mkdocs.yml | 10 ++++++---- 2 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/docs-ci.yaml diff --git a/.github/workflows/docs-ci.yaml b/.github/workflows/docs-ci.yaml new file mode 100644 index 00000000..9c3bca33 --- /dev/null +++ b/.github/workflows/docs-ci.yaml @@ -0,0 +1,29 @@ +name: ci +on: + push: + branches: + - master + - 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] + 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 + - run: mkdocs gh-deploy --force diff --git a/gen3/mkdocs.yml b/gen3/mkdocs.yml index 09cf4167..ce5d9783 100644 --- a/gen3/mkdocs.yml +++ b/gen3/mkdocs.yml @@ -105,6 +105,9 @@ theme: name: material features: - navigation.footer + - navigation.indexes + - navigation.tracking + - navigation.path palette: @@ -121,10 +124,6 @@ theme: toggle: icon: material/eye-outline name: Switch to light mode - features: - - navigation.indexes - - navigation.tracking - - navigation.path extra_css: - stylesheets/extra.css use_directory_urls: true @@ -147,3 +146,6 @@ plugins: blog_toc: true - mkdocs-video: is_video: True + - encryptcontent: + password_inventory: + _global: 'gen3' From cb394c0c35cd3e3d8cca0f4652474914a4cdfb68 Mon Sep 17 00:00:00 2001 From: Jawad Qureshi Date: Mon, 2 Dec 2024 11:47:09 -0600 Subject: [PATCH 2/2] Test gh action --- .github/workflows/docs-ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docs-ci.yaml b/.github/workflows/docs-ci.yaml index 9c3bca33..3b109127 100644 --- a/.github/workflows/docs-ci.yaml +++ b/.github/workflows/docs-ci.yaml @@ -4,6 +4,7 @@ on: branches: - master - main + - feat/staging-docs permissions: contents: write jobs: