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

Updated pages deployment #2817

Merged
Merged
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
54 changes: 47 additions & 7 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name: Docs
on:
push:
branches:
- main
- main
workflow_dispatch:

permissions: {}
Expand All @@ -19,13 +19,12 @@ env:
DOTNET_CLI_TELEMETRY_OPTOUT: true

jobs:
deploy:
publish:
name: Publish docs
runs-on: ubuntu-latest
permissions:
contents: write
steps:

- name: Checkout
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -54,13 +53,54 @@ jobs:
Invoke-Build BuildDocs
shell: pwsh

- name: Checkout gh-pages
uses: actions/checkout@v4
with:
ref: refs/heads/gh-pages
path: site/

- name: Build site
run: mkdocs build
env:
MKDOCS_GIT_COMMITTERS_APIKEY: ${{ secrets.GITHUB_TOKEN }}

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
- name: Push content
run: |
cd site/
git config user.name github-actions
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
git add *
git commit -m "deploy ${{ github.sha }}"
git push

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:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
ref: refs/heads/gh-pages

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

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

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
Loading