From 4660dc62f8ae4c4466b1d1b779d8899ad4244647 Mon Sep 17 00:00:00 2001 From: Aire-One Date: Thu, 21 Oct 2021 19:07:33 +0200 Subject: [PATCH] ci: add doc workflow GitHub Actions to build and deploy doc to gh-pages. --- .editorconfig | 2 +- .github/workflows/doc.yaml | 40 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/doc.yaml diff --git a/.editorconfig b/.editorconfig index 5967019..98236fe 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,5 +11,5 @@ charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true -[*.json] +[*.{json,yaml}] indent_size = 2 diff --git a/.github/workflows/doc.yaml b/.github/workflows/doc.yaml new file mode 100644 index 0000000..36646b8 --- /dev/null +++ b/.github/workflows/doc.yaml @@ -0,0 +1,40 @@ +name: Build doc + +on: + push: + branches: [$default-branch] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +# Cancel the previous run if it's still in progress +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Generate docs with LDoc + uses: lunarmodules/ldoc@v1.5.0 + - name: Upload static files as artifact + id: deployment + uses: actions/upload-pages-artifact@v3 + with: + path: doc/ + deploy: + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4