diff --git a/.github/workflows/build_doc.yml b/.github/workflows/build_doc.yml index 9197337..43a412d 100644 --- a/.github/workflows/build_doc.yml +++ b/.github/workflows/build_doc.yml @@ -1,4 +1,4 @@ -name: Build and Deploy Sphinx Site +name: Build Sphinx Doc on: pull_request: diff --git a/.github/workflows/deploy_doc.yml b/.github/workflows/deploy_doc.yml index fe7f3cb..81191f9 100644 --- a/.github/workflows/deploy_doc.yml +++ b/.github/workflows/deploy_doc.yml @@ -1,4 +1,4 @@ -name: Build and Deploy Sphinx Site +name: Build and Deploy Sphinx Doc on: push: @@ -6,24 +6,44 @@ on: - 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