Skip to content

Clean up code

Clean up code #85

name: Publish Website
on:
workflow_dispatch:
push:
branches:
- 'main'
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Publish Website
runs-on: ubuntu-latest
steps:
# SETUP BUILD ENVIRONMENT
- id: prepare-maven-build
name: Prepare Maven build
uses: sualeh/[email protected]
with:
java-version: 8
- id: install-graphviz
name: Install Graphviz
uses: sualeh/[email protected]
# BUILD FOR DISTRIBUTION
- id: build
name: Build and test for distribution
shell: bash
run: |
# Build
mvn \
--no-transfer-progress \
--batch-mode \
-Ddistrib \
clean install
# CHECK WEBSITE LINKS
- id: check-links
name: Check website links
uses: lycheeverse/[email protected]
with:
args: --verbose --accept 200,999 --no-progress ./schemacrawler-website/target/_website/**/*
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- id: upload-link-check-report
name: Upload website link check report
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # @v3
with:
path: ./lychee/out.md
name: website-link-check-report.md
retention-days: 15
# UPLOAD WEBSITE
- id: configure-pages
name: Setup Pages
uses: actions/configure-pages@v3
- id: upload-artifact
name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./schemacrawler-website/target/_website
deploy:
name: Deploy Website
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deploy-pages.outputs.page_url }}
needs: build
steps:
- id: deploy-pages
name: Deploy to GitHub Pages
uses: actions/deploy-pages@v2