From d5f65d4bc607d203ecd2f5f7f2e94ea6d8d1ab42 Mon Sep 17 00:00:00 2001 From: suve Date: Wed, 16 Nov 2022 15:59:15 +0100 Subject: [PATCH 1/2] Add CI workflow to build docs & deploy to GHPages --- .github/workflows/docs.yml | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..8e1e5e2b --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,44 @@ +name: Build documentation using PasDoc and deploy to GitHub Pages + +on: + push: + branches: ["master"] + + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Install PasDoc + run: | + export DEBIAN_FRONTEND=noninteractive + sudo apt update + sudo apt install -y pasdoc + - name: Checkout + uses: actions/checkout@v3 + - name: Build documentation + run: | + mkdir gh-pages/ + pasdoc --output gh-pages/ --format html --ignore-leading '*' --sort constants,functions,types,structures --define FPC --include units/ units/*.pas + - name: Setup Pages + uses: actions/configure-pages@v2 + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: 'gh-pages/' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1 From fbb52c72f757f3050a372710459b915047ee0888 Mon Sep 17 00:00:00 2001 From: suve Date: Wed, 16 Nov 2022 16:07:07 +0100 Subject: [PATCH 2/2] Build docs on Ubuntu 22.04 instead of 20.04 Ubuntu 22.04 contains a newer version of PasDoc - v0.16.0, compared to v0.15.0 found on Ubuntu 20.04. --- .github/workflows/docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8e1e5e2b..033ce5e6 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,4 +1,4 @@ -name: Build documentation using PasDoc and deploy to GitHub Pages +name: Build and deploy documentation on: push: @@ -20,7 +20,7 @@ jobs: environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Install PasDoc run: |