-
-
Notifications
You must be signed in to change notification settings - Fork 200
87 lines (73 loc) · 1.89 KB
/
publish-website.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
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