From 4c94c7c25c2dfcdb8ad1cff0d8f838bc645a4fcc Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Sun, 24 Nov 2024 22:11:25 +0000 Subject: [PATCH] Create documentation workflow --- .github/workflows/main.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..20cc1514b --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,34 @@ +name: Generate Documentation + +on: + pull_request: + branches: [ main ] + repository_dispatch: + types: [ generate ] + workflow_dispatch: + schedule: + - cron: '15 5 * * *' + +permissions: + contents: write + +jobs: + build: + # Only run scheduled workflows on the main repository; prevents people + # from using build minutes on their forks. + if: github.repository == 'libgit2/www.libgit2.org-docs' + name: "Generate documentation" + runs-on: "ubuntu-latest" + steps: + - name: Check out repository + uses: actions/checkout@v4 + with: + path: docs + fetch-depth: 0 + - name: Set up documentation generator + run: npm install + - name: Generate documentation + run: ./generate docs + - name: Examine repository + run: git status + working-directory: docs