Address security warning from Yaron Avital [email protected] #284
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 --base . `./schemacrawler-website/target/_website/**/*.html` | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
- id: upload-link-check-report | |
name: Upload website link check report | |
uses: actions/upload-artifact@v4 | |
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@v5 | |
- id: upload-artifact | |
name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
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@v4 |