Skip to content

Commit

Permalink
github_workflows/docs: deploy from workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
proppy authored and copybara-github committed Nov 1, 2024
1 parent 2777488 commit 37bd4b9
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions .github/workflows/build-mkdocs-commit-html.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@ on:
# This lets us trigger manually from the UI.
workflow_dispatch:

permissions:
contents: write

jobs:
docs:
build:
runs-on:
labels: ubuntu-22.04-4core
steps:
Expand All @@ -25,8 +22,21 @@ jobs:
- name: Build MkDocs And Commit HTML
run: |
mkdocs build
git config --global user.name 'xls-github-bot'
git config --global user.email 'xls-github-bot'
git add .
LATEST_HASH=$(git rev-parse HEAD)
git commit -a -m "mkdocs generated documentation from ${LATEST_HASH}" && git push
- name: Upload static files as artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/
deploy:
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on:
labels: ubuntu-22.04-4core
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 37bd4b9

Please sign in to comment.