forked from cf-convention/cf-conventions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request cf-convention#475 from larsbarring/automate_docume…
…nt_production_date Automate document production date
- Loading branch information
Showing
3 changed files
with
10 additions
and
5 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,20 +44,24 @@ jobs: | |
- uses: actions/checkout@v2 | ||
# Create build directory | ||
- run: mkdir conventions_build | ||
- name: Set "final" tag | ||
- name: Set draft date-time formatting | ||
if: github.event_name != 'release' | ||
run: | | ||
echo "DATE_FMT=+%d %B, %Y %H:%M:%SZ" >> "$GITHUB_ENV" | ||
- name: Set "final" tag and date-time formatting | ||
if: github.event_name == 'release' | ||
run: | | ||
echo "FINAL_TAG=-a final" >> "$GITHUB_ENV" | ||
echo "FINAL_TAG=-a final" >> "$GITHUB_ENV"; echo "DATE_FMT=+%d %B, %Y" >> "$GITHUB_ENV" | ||
# Build cf-conventions.html using the Analog-inc asciidoctor-action | ||
- name: Build cf-conventions.html | ||
uses: Analog-inc/[email protected] | ||
with: | ||
shellcommand: 'asciidoctor --verbose ${FINAL_TAG} cf-conventions.adoc -D conventions_build; cp -r images conventions_build' | ||
shellcommand: 'asciidoctor --verbose ${FINAL_TAG} -a docprodtime=$(date -u ${DATE_FMT}) cf-conventions.adoc -D conventions_build; cp -r images conventions_build' | ||
# Build cf-conventions.pdf using the Analog-inc asciidoctor-action | ||
- name: Build cf-conventions.pdf | ||
uses: Analog-inc/[email protected] | ||
with: | ||
shellcommand: 'asciidoctor-pdf --verbose ${FINAL_TAG} -d book -a pdf-theme=default-theme-CF-version.yml --trace cf-conventions.adoc -D conventions_build' | ||
shellcommand: 'asciidoctor-pdf --verbose ${FINAL_TAG} -a docprodtime=$(date -u ${DATE_FMT}) -d book -a pdf-theme=default-theme-CF-version.yml --trace cf-conventions.adoc -D conventions_build' | ||
# Upload artifact containing cf-conventions.html, cf-conventions.pdf | ||
- name: Upload cf-conventions doc preview | ||
uses: actions/upload-artifact@v2 | ||
|
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 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