ICS-902 Remove unwanted blank pages before rear cover. #2
Workflow file for this run
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
# This is the basic workflow to build release documentation | |
name: Release Build | |
## This section contains ALL variable specific for this project ## | |
# The VERSION is the main release number i.e. 1.7 or 2.1 (here for convenience but the git tag is actually used) | |
env: | |
BUILD_NAME: ICS-XDF-PRINTPROCUREMENT | |
#DOCUMENT_VERSION: '2.2' | |
DOCUMENT_COVER_TITLE: Automated Print Procurement ICS | |
CONFIG_FILE: Build\ICS_XJDF_PrintProcurement.ini | |
CONFLUENCE_ID: '1560313992' | |
CONFLUENCE_LABELS: 'ics-xdf-printprocurement,milestone' | |
DOCUMENT_METADATA_COPYRIGHT: 'CIP4 Organization, all rights reserved' | |
DOCUMENT_METADATA_TITLE: 'Automated Print Procurement ICS' | |
BUILD_UTILITY_EXE: c:\actions-runner\_work\_tool\document-processing\document-processing.exe | |
## The remaining section SHOULD be common to all draft documentation builds | |
# Controls when the action will run | |
on: | |
push: | |
tags: | |
- '2*' | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
build: | |
runs-on: [framemaker-2020] | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# For access to other Git repositories - an access token is required. | |
- name: Get GitHub Access Token | |
id: access_token | |
uses: tibdex/github-app-token@v1 | |
with: | |
app_id: ${{ secrets.CIP4_GITHUB_ACTIONS_APP_ID }} | |
private_key: ${{ secrets.CIP4_GITHUB_ACTIONS_APP_KEY }} | |
# Clean up working directory | |
- name: Clean up working directory | |
run: rm -r -fo * | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- name: Checkout source | |
uses: actions/checkout@v2 | |
with: | |
path: document | |
# Check out the build scripts | |
- name: Checkout build scripts | |
uses: actions/checkout@v2 | |
with: | |
repository: cip4/cip4-document-builder | |
token: ${{ steps.access_token.outputs.token }} | |
path: builder | |
# Build the release document - note: no cover version required, part of cover title. | |
- name: Build Document | |
timeout-minutes: 30 | |
run: > | |
python ..\builder\scripts\specbuilder.py $env:CONFIG_FILE | |
"$env:DOCUMENT_COVER_TITLE $(${env:GITHUB_REF}.replace('refs/tags/',''))" | |
"$env:DOCUMENT_COVER_TITLE" | |
"Version $(${env:GITHUB_REF}.replace('refs/tags/',''))" | |
"$env:DOCUMENT_METADATA_TITLE $(${env:GITHUB_REF}.replace('refs/tags/',''))" | |
"$(${env:GITHUB_REF}.replace('refs/tags/',''))" | |
"$((Get-Date).ToString('MMMM yyyy')) $env:DOCUMENT_METADATA_COPYRIGHT" | |
"2000-$((Get-Date).ToString('yyyy'))" | |
"Run-$env:GITHUB_RUN_NUMBER" | |
working-directory: ./document | |
# Upload any artefact produced. | |
- name: Upload Document | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ env.BUILD_NAME }}-artifact | |
path: document/target/*.pdf | |
# Generate full Confluence Labels List | |
- name: Generate Full Confluence Labels List | |
run: > | |
echo "FULL_CONFLUENCE_LABELS=${env:CONFLUENCE_LABELS},$(${env:GITHUB_REF}.replace('refs/tags/',''))" | | |
Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
# Upload to Confluence | |
- name: Confluence Upload | |
uses: cip4/action-confluence-upload@master | |
with: | |
url: 'https://cip4.atlassian.net/wiki' | |
username: ${{ secrets.ATLASSIAN_USER }} | |
password: ${{ secrets.ATLASSIAN_TOKEN }} | |
contentId: ${{ env.CONFLUENCE_ID }} | |
label: ${{ env.FULL_CONFLUENCE_LABELS }} | |
filePattern: 'document/target/*.pdf' |