From 49822cffaf39b2ecb755cb54cccfa3b48f4fed8b Mon Sep 17 00:00:00 2001 From: Florian Dejonckheere Date: Sun, 28 Jul 2024 22:28:46 +0200 Subject: [PATCH] Add documentation workflow --- .github/workflows/documentation.yml | 59 +++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflows/documentation.yml diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 0000000..149135f --- /dev/null +++ b/.github/workflows/documentation.yml @@ -0,0 +1,59 @@ +name: Documentation + +on: + push: + branches: + - master + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + build: + name: Documentation + runs-on: ubuntu-latest + + container: + image: ruby:3.3-alpine + + steps: + - uses: actions/checkout@v4 + + - name: Install dependencies + run: | + apk add build-base cmake git tar + + - name: Cache Gems + uses: actions/cache@v4.0.2 + with: + path: vendor/bundle + key: alpine-3.4-gem-${{ hashFiles('**/Gemfile.lock') }} + restore-keys: | + alpine-3.4-gem- + + - name: Install Gems + run: | + gem install bundler + bundle config path vendor/bundle + bundle install --jobs 4 --retry 3 + + - name: Setup Pages + uses: actions/configure-pages@v5 + + - name: Build YARD documentation + run: bundle exec yard doc + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: doc + + - name: Deploy to GitHub Pages + uses: actions/deploy-pages@main