Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Create a release for the Intune as-built
name: Create documentation release
on:
push:
tags:
- "v*.*.*"
jobs:
document-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: main
token: ${{ secrets.GITHUB_TOKEN }}
# Install md-to-pdf
# https://github.com/simonhaenisch/md-to-pdf
- name: Install md-to-pdf
shell: bash
run: |
npm i -g md-to-pdf
# Convert markdown document to PDF
- name: Convert markdown to PDF
shell: bash
run: |
md-to-pdf "$GITHUB_WORKSPACE/prod-as-built.md" \
--config-file ./md2pdf/pdfconfig.json
# Convert markdown document to PDF
- name: Convert markdown to HTML
shell: bash
run: |
md-to-pdf "$GITHUB_WORKSPACE/prod-as-built.md" \
--config-file ./md2pdf/htmlconfig.json --as-html
# Import GPG key so that we can sign the commit
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPGKEY }}
passphrase: ${{ secrets.GPGPASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
git_config_global: true
git_tag_gpgsign: true
git_push_gpgsign: false
git_committer_name: ${{ secrets.COMMIT_NAME }}
git_committer_email: ${{ secrets.COMMIT_EMAIL }}
# Upload release
- name: Upload release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
prerelease: false
files: |
prod-as-built.pdf
prod-as-built.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment