From 26a8657edc701b8ff99bd29ac3927a38fee245a2 Mon Sep 17 00:00:00 2001 From: Paul Mucur Date: Sun, 5 Nov 2023 09:07:12 +0000 Subject: [PATCH] Automatically update docs site Rather than manually updating the docs at https://mudge.name/re2, configure GitHub Actions to do it automatically on every push to the main branch. --- .github/workflows/docs.yml | 35 +++++++++++++++++++++++++++++++++++ Gemfile | 1 + 2 files changed, 36 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..b39a349c --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,35 @@ +name: Build documentation + +on: + workflow_dispatch: + push: + branches: + - main + +jobs: + build: + runs-on: "ubuntu-latest" + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.2" + bundler-cache: true + - run: bundle exec yard + - uses: actions/upload-pages-artifact@v2 + with: + path: "doc/" + + deploy: + needs: build + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 diff --git a/Gemfile b/Gemfile index 95334810..2107305c 100644 --- a/Gemfile +++ b/Gemfile @@ -3,3 +3,4 @@ source "https://rubygems.org" gemspec gem "rake", "> 12.3.2" +gem "yard"