From 739ecbcf0cae7e0203c0a5bea74a5e65ab9aa344 Mon Sep 17 00:00:00 2001 From: borodun Date: Wed, 27 Sep 2023 16:08:55 +0700 Subject: [PATCH] Add pipeline for docs using GitHub Pages --- .github/workflows/deploy-docs.yml | 51 +++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/deploy-docs.yml diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml new file mode 100644 index 0000000..2047a36 --- /dev/null +++ b/.github/workflows/deploy-docs.yml @@ -0,0 +1,51 @@ +name: Build and Deploy Docs + +# Deploy docs only for master +on: + push: + branches: + - "master" + +# Allow deployment to GitHub Pages +permissions: + pages: write + id-token: write + +jobs: + deploy-docs: + + name: Deploy Docs + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + runs-on: ubuntu-latest + + steps: + - name: Install dependencies + run: | + sudo apt update && sudo apt install -y \ + docbook-xml \ + docbook-xsl \ + libxml2-utils \ + xsltproc \ + fop + + - name: Clone pgSphere + uses: actions/checkout@v4 + + - name: Build docs + run: make -C doc + + - name: Setup Pages + uses: actions/configure-pages@v3 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + path: 'doc/html' + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2