Skip to content

Improve generateDocumentation #3270

Improve generateDocumentation

Improve generateDocumentation #3270

Workflow file for this run

name: Build and Deploy Website
on:
push:
branches:
- main
pull_request:
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
permissions:
contents: write # for JamesIves/github-pages-deploy-action to push changes in repo
jobs:
build-detekt-docs:
if: github.repository == 'detekt/detekt'
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- name: Setup Java
uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3
with:
java-version: 17
distribution: 'temurin'
- name: Setup Node
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3
with:
node-version: '16'
cache: 'yarn'
cache-dependency-path: 'website/yarn.lock'
- name: Run generateWebsite
uses: gradle/gradle-build-action@a4cf152f482c7ca97ef56ead29bf08bcd953284c # v2
with:
gradle-home-cache-cleanup: true
arguments: :detekt-generator:generateWebsite
- name: Install Yarn Dependencies
working-directory: website/
run: yarn install
- name: Build the Detekt Website
working-directory: website/
run: yarn build
- name: Deploy GitHub Pages (only on main)
uses: JamesIves/github-pages-deploy-action@a1ea191d508feb8485aceba848389d49f80ca2dc # v4
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
with:
branch: gh-pages
folder: website/build/