Merge pull request #10 from intergral/snyk-upgrade-56a8d7923cb3b7ce76… #23
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: Page Deployment | |
on: | |
push: | |
branches: | |
- master | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.12 | |
- run: make gen-docs | |
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | |
- uses: actions/cache@v3 | |
with: | |
key: mkdocs-material-${{ env.cache_id }} | |
path: .cache | |
restore-keys: | | |
mkdocs-material- | |
- run: pip install mkdocs-material | |
- run: mkdocs build -d./_site | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Mk docs | |
path: _site | |
build-mvn-site: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
cache: 'maven' | |
- name: Generate Maven Site | |
run: make gen-mvn-site | |
- name: Download artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: Mk docs | |
path: _site | |
- name: Include site | |
run: mv build/java/target/site ./_site/mvn | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
deploy: | |
needs: build-mvn-site | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |