arc42.tooling/.devops/export-as-artifact.yml
2024-10-04 14:17:14 +02:00

28 lines
No EOL
881 B
YAML

trigger:
branches:
include:
- "*"
paths:
include:
- .docs/.arc42/src
pool:
vmImage: ubuntu-latest
steps:
- script: |
chmod +x ./init.sh
./init.sh
chmod +x ./create-pdf.sh
./create-pdf.sh
workingDirectory: .docs/.arc42/
- script: |
# Get the full branch reference from Azure DevOps environment variables
FULL_BRANCH_REF=$(Build.SourceBranch)
# Remove the "refs/heads/" prefix to get just the branch name
BRANCH_NAME=${FULL_BRANCH_REF#refs/heads/}
# Publish the PDF file as an artifact with the filename as the name
echo "##vso[artifact.upload containerfolder=arc42;artifactname=arc42-$(date +'%Y%m%d%H%M%S')-$BRANCH_NAME;]$(System.DefaultWorkingDirectory)/.docs/.arc42/output/arc42.pdf"
displayName: "Publish PDF Artifacts"
workingDirectory: .docs/.arc42/