diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..ce17664 --- /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 yardoc + - 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/re2.gemspec b/re2.gemspec index 1a7475d..23087d5 100644 --- a/re2.gemspec +++ b/re2.gemspec @@ -40,5 +40,7 @@ Gem::Specification.new do |s| s.add_development_dependency("rake-compiler", "~> 1.2.1") s.add_development_dependency("rake-compiler-dock", "~> 1.3.0") s.add_development_dependency("rspec", "~> 3.2") + s.add_development_dependency("yard") + s.add_development_dependency("redcarpet") s.add_runtime_dependency("mini_portile2", "~> 2.8.5") # keep version in sync with extconf.rb end