diff --git a/.github/workflows/gh-pages.yaml b/.github/workflows/gh-pages.yaml deleted file mode 100644 index d6a92c44..00000000 --- a/.github/workflows/gh-pages.yaml +++ /dev/null @@ -1,91 +0,0 @@ -name: Publish Documentation -on: - workflow_dispatch: - push: - branches: - - main - paths: - - 'DoxyGen/**' - pull_request: - branches: - - main - paths: - - 'DoxyGen/**' -jobs: - docs: - name: Build main documentation - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - - name: Install packages - run: | - sudo apt-get update - sudo apt-get install --no-install-recommends -y graphviz plantuml - sudo pip install LinkChecker - - - name: Cache Doxygen 1.13.2 - id: cache-doxygen - uses: actions/cache@v5 - with: - path: /opt/doxygen-1.13.2 - key: doxygen-1.13.2-${{ runner.os }} - - - name: Download Doxygen 1.13.2 - if: steps.cache-doxygen.outputs.cache-hit != 'true' - shell: bash - run: | - wget -O doxygen.tgz https://sourceforge.net/projects/doxygen/files/rel-1.13.2/doxygen-1.13.2.linux.bin.tar.gz - sudo tar -C /opt -xf doxygen.tgz - - - name: Install Doxygen 1.13.2 - shell: bash - run: | - sudo ln -s /opt/doxygen-1.13.2/bin/doxygen /usr/local/bin/ - which doxygen - doxygen --version - - - name: Generate doxygen - run: | - echo "::add-matcher::.github/doxygen.json" - DoxyGen/gen_doc.sh - echo "::remove-matcher owner=doxygen::" - - - name: Run linkchecker - run: | - echo "::add-matcher::.github/linkchecker.json" - DoxyGen/check_links.sh - echo "::remove-matcher owner=linkchecker::" - - - name: Archive documentation - if: ${{ github.event_name == 'pull_request' }} - uses: actions/upload-artifact@v6 - with: - name: documentation - path: Documentation/ - retention-days: 1 - if-no-files-found: error - - - name: Archive documentation - if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} - run: | - cd Documentation - tar -cvjf /tmp/doc.tbz2 . - - - uses: actions/checkout@v6 - if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} - with: - ref: gh-pages - - - name: Publish documentation - if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} - run: | - rm -r main - mkdir main - cd main - tar -xvjf /tmp/doc.tbz2 - git config user.name github-actions - git config user.email github-actions@github.com - git add . - git commit -m "Update main documentation" - git push diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 00000000..0bc3af61 --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,46 @@ +# Simple workflow for deploying static content to GitHub Pages +name: Deploy static content to GitHub Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: [gh-pages] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Single deploy job since we're just deploying + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Setup Pages + uses: actions/configure-pages@v5 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v4 + with: + # Upload entire repository + path: '.' + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/pack.yml b/.github/workflows/pack.yml index 571bf289..92bfa21b 100644 --- a/.github/workflows/pack.yml +++ b/.github/workflows/pack.yml @@ -38,5 +38,5 @@ jobs: doc-path: ./Documentation gen-pack-script: ./gen_pack.sh --no-preprocess gen-pack-output: ./output - gh-pages-branch: "" - gh-pages-deploy: "" + gh-pages-branch: gh-pages + gh-pages-deploy: gh-pages.yml