Skip to content

Commit

Permalink
gh ci: fix deploy doc action
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas Remmert <[email protected]>
  • Loading branch information
jonas-rem committed May 10, 2024
1 parent 2da432e commit 25ffe5b
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_doc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Deploy Sphinx Site
name: Build Sphinx Doc

on:
pull_request:
Expand Down
56 changes: 38 additions & 18 deletions .github/workflows/deploy_doc.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,49 @@
name: Build and Deploy Sphinx Site
name: Build and Deploy Sphinx Doc

on:
push:
branches:
- main

jobs:
build-and-deploy:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Packages
run: sudo apt-get update && sudo apt-get install -y default-jre plantuml tox
- name: Build static site with Tox
run: |
cd doc
tox -e py3-html
- name: Remove Hard Links
run: find /build/html -type f -links +1 -exec sh -c 'cp --remove-destination "$1" "$1.temp" && mv -f "$1.temp" "$1"' _ {} \;
- name: Upload Artifacts for Deployment
uses: actions/upload-artifact@v4
with:
name: github-pages
path: doc/build/html

deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Packages
run: sudo apt-get update && sudo apt-get install -y default-jre plantuml tox
- name: Build static site with Tox
run: |
cd doc
tox -e py3-html
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./doc/build/html
- name: Print deployment page URL
run: echo "Deployed to ${{ steps.deployment.outputs.page_url }}"
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: github-pages
- name: List Files
run: ls -R .
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
artifact_name: github-pages

0 comments on commit 25ffe5b

Please sign in to comment.