Skip to content

Commit

Permalink
Fix v2 doc publishing (#1665)
Browse files Browse the repository at this point in the history
* Fix v2 doc publishing

* Remove main trigger
  • Loading branch information
BernieWhite authored Nov 14, 2023
1 parent 77ce792 commit a7b6a2d
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 10 deletions.
44 changes: 38 additions & 6 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ name: Docs
on:
push:
branches:
- main
- release/v2.9.x
workflow_dispatch:

permissions: {}

jobs:
deploy:
publish:
name: Publish docs
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -34,7 +34,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.11'
architecture: 'x64'

- name: Install dependencies
Expand All @@ -43,5 +43,37 @@ jobs:
python3 -m pip install wheel
python3 -m pip install -r requirements-docs.txt
- name: Deploy site
run: mike deploy --push --update-aliases v2 latest stable --title 'v2'
- name: Generate site
run: mike deploy --push --update-aliases v2 stable --title 'v2'

deploy:
name: Deploy pages
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: [publish]
concurrency:
group: pages
cancel-in-progress: false
permissions:
contents: read
pages: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: refs/heads/gh-pages

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: '.'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ nav:
- Related projects: related-projects.md
- Releases:
- Change log:
- v3: 'https://microsoft.github.io/PSRule/v3/CHANGELOG-v3/'
- v2: 'CHANGELOG-v2.md'
- v1: 'CHANGELOG-v1.md'
- v0: 'CHANGELOG-v0.md'
Expand Down
8 changes: 4 additions & 4 deletions requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
mkdocs==1.5.2
mkdocs-material==9.3.1
pymdown-extensions==10.3
mike==1.1.2
mkdocs==1.5.3
mkdocs-material==9.4.8
pymdown-extensions==10.4
mike==2.0.0
mkdocs-simple-hooks==0.1.5
mkdocs-git-revision-date-plugin==0.3.2
mdx-truly-sane-lists==1.3
Expand Down

0 comments on commit a7b6a2d

Please sign in to comment.