forked from cabforum/smime
-
Notifications
You must be signed in to change notification settings - Fork 4
36 lines (36 loc) · 1.27 KB
/
build-draft-docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Build Draft Guidelines
on: [push, pull_request, workflow_dispatch]
jobs:
build_docs:
strategy:
matrix:
document:
- 'SBR.md'
name: Build ${{ matrix.document }}
runs-on: ubuntu-20.04
steps:
- name: Checkout the code
uses: actions/checkout@v3
- name: Checkout old version for redline (pull request)
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.base.sha || github.event.push.before }}
path: old/
- uses: cabforum/build-guidelines-action@v2.1.2
id: build_doc
with:
markdown_file: ${{ matrix.document }}
diff_file: old/${{ matrix.document }}
pdf: true
docx: true
lint: true
draft: ${{ !(github.event_name == 'push' && github.repository == 'cabforum/smime' && github.ref == 'refs/heads/main') }}
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.document }}-${{ github.event.pull_request.head.sha || github.sha }}
path: |
${{ steps.build_doc.outputs.pdf_file }}
${{ steps.build_doc.outputs.docx_file }}
${{ steps.build_doc.outputs.pdf_redline_file }}
if-no-files-found: 'error'
retention-days: 21