Skip to content

Commit 466e048

Browse files
authored
Create build_docs.yaml
1 parent 0d100ff commit 466e048

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/build_docs.yaml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: "Build the docs"
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ master ]
7+
8+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
15+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
16+
concurrency:
17+
group: "pages"
18+
cancel-in-progress: false
19+
20+
jobs:
21+
build-docs:
22+
name: build-docs
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
- name: Setup Java 11
27+
uses: actions/setup-java@v2
28+
with:
29+
java-version: 11
30+
distribution: "temurin"
31+
- name: Build docs
32+
run: |
33+
mvn -Dprod site site:site-stage
34+
#- name: Fix permissions
35+
# run: |
36+
# chmod -c -R +rX "outputdir/" | while read line; do
37+
# echo "::warning title=Invalid file permissions automatically fixed::$line"
38+
# done
39+
# Create and upload Pages artifact from docs dir
40+
- name: Upload Pages artifact
41+
uses: actions/upload-pages-artifact@v2
42+
with:
43+
path: ./target/staging
44+
45+
# Deployment job
46+
deploy:
47+
environment:
48+
name: github-pages
49+
url: ${{ steps.deployment.outputs.page_url }}
50+
runs-on: ubuntu-latest
51+
needs: build-docs
52+
steps:
53+
- name: Deploy to GitHub Pages
54+
id: deployment
55+
uses: actions/deploy-pages@v2

0 commit comments

Comments
 (0)