Merge pull request #829 from DependencyTrack/cel-policies-docs #9
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: Deploy Documentation | |
on: | |
push: | |
paths: | |
- "docs/**" | |
- mkdocs.yml | |
branches: | |
- main | |
permissions: { } | |
jobs: | |
deploy-docs: | |
name: Deploy Documentation | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # Required to create releases | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # tag=v4.1.0 | |
with: | |
fetch-depth: 0 | |
- name: Setup Python | |
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # tag=v4.7.1 | |
with: | |
python-version: "3.9" | |
check-latest: true | |
- name: Install Requirements | |
run: pip install mkdocs-material mike | |
- name: Determine Project Version | |
id: determine_version | |
run: |- | |
VERSION=`yq -p=xml '.project.version' pom.xml` | |
echo "version=${VERSION}" >> $GITHUB_OUTPUT | |
- name: Configure Git User | |
run: |- | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
- name: Deploy | |
run: mike deploy --push --update-aliases ${{ steps.determine_version.outputs.version }} latest |