Skip to content

Commit a2e4de9

Browse files
author
jon gadsden
committed
provide release workflow
1 parent c29c008 commit a2e4de9

File tree

3 files changed

+174
-42
lines changed

3 files changed

+174
-42
lines changed

.github/workflows/ci.yaml

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ on:
33
push:
44
branches:
55
- main
6-
pull_request:
7-
branches:
8-
- main
96
workflow_dispatch:
107

118
# for security reasons the github actions are pinned to specific release versions
@@ -48,42 +45,3 @@ jobs:
4845

4946
- name: spell_checker
5047
uses: rojopolis/[email protected]
51-
52-
export_draft:
53-
name: Export epub and pdf (Draft)
54-
runs-on: ubuntu-22.04
55-
needs: [link_checker, md_linter, spell_checker]
56-
steps:
57-
- name: Checkout markdown
58-
uses: actions/[email protected]
59-
60-
- name: Combine markdown
61-
run: |
62-
tail --lines=+14 -q $(find draft -name "*[0-9]*.md" | sort) > draft.markdown
63-
mkdir -p publish
64-
65-
- name: Export to pdf
66-
uses: docker://pandoc/latex:3.1
67-
with:
68-
args: >-
69-
--from=markdown
70-
--output=publish/OWASP_Developer_Guide.draft.pdf
71-
--resource-path="draft/assets/images:draft/assets:draft"
72-
draft/title.pdf.yaml
73-
draft.markdown
74-
75-
- name: Export to epub
76-
uses: docker://pandoc/latex:3.1
77-
with:
78-
args: >-
79-
--from=markdown
80-
--output=publish/OWASP_Developer_Guide.draft.epub
81-
--resource-path="draft/assets/images:draft/assets:draft"
82-
draft/title.yaml
83-
draft.markdown
84-
85-
- name: Save pdfs and epubs
86-
uses: actions/[email protected]
87-
with:
88-
name: export-draft
89-
path: publish

.github/workflows/pr.yaml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: Pull request pipeline
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
workflow_dispatch:
7+
8+
# for security reasons the github actions are pinned to specific release versions
9+
jobs:
10+
link_checker:
11+
name: Link checker
12+
runs-on: ubuntu-22.04
13+
steps:
14+
- name: Checkout markdown
15+
uses: actions/[email protected]
16+
17+
- name: Link Checker
18+
uses: lycheeverse/[email protected]
19+
with:
20+
# skip the jekyll files
21+
args: --verbose --no-progress --max-retries 5 --exclude-path './_includes/*.html' '**/*.md' '*.md'
22+
fail: true
23+
env:
24+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
25+
26+
md_linter:
27+
name: Lint markdown
28+
runs-on: ubuntu-22.04
29+
steps:
30+
- name: Checkout markdown
31+
uses: actions/[email protected]
32+
33+
- name: Lint markdown
34+
uses: DavidAnson/[email protected]
35+
with:
36+
config: '.markdownlint.yaml'
37+
globs: '**/*.md'
38+
39+
spell_checker:
40+
name: Check spelling
41+
runs-on: ubuntu-22.04
42+
steps:
43+
- name: Checkout markdown
44+
uses: actions/[email protected]
45+
46+
- name: spell_checker
47+
uses: rojopolis/[email protected]
48+
49+
export_draft:
50+
name: Export epub and pdf (Draft)
51+
runs-on: ubuntu-22.04
52+
needs: [link_checker, md_linter, spell_checker]
53+
steps:
54+
- name: Checkout markdown
55+
uses: actions/[email protected]
56+
57+
- name: Combine markdown
58+
run: |
59+
tail --lines=+14 -q $(find draft -name "*[0-9]*.md" | sort) > draft.markdown
60+
mkdir -p publish
61+
62+
- name: Export to pdf
63+
uses: docker://pandoc/latex:3.1
64+
with:
65+
args: >-
66+
--from=markdown
67+
--output=publish/OWASP_Developer_Guide.draft.pdf
68+
--resource-path="draft/assets/images:draft/assets:draft"
69+
draft/title.pdf.yaml
70+
draft.markdown
71+
72+
- name: Export to epub
73+
uses: docker://pandoc/latex:3.1
74+
with:
75+
args: >-
76+
--from=markdown
77+
--output=publish/OWASP_Developer_Guide.draft.epub
78+
--resource-path="draft/assets/images:draft/assets:draft"
79+
draft/title.yaml
80+
draft.markdown
81+
82+
- name: Save pdfs and epubs
83+
uses: actions/[email protected]
84+
with:
85+
name: export-draft
86+
path: publish

.github/workflows/release.yaml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Release docs
2+
3+
on:
4+
push:
5+
# only for version x.x.x releases and release candidates
6+
tags:
7+
- v?.?.?*
8+
workflow_dispatch:
9+
10+
# for security reasons the github actions are pinned to specific release versions
11+
jobs:
12+
link_checker:
13+
name: Link checker
14+
runs-on: ubuntu-22.04
15+
steps:
16+
- name: Checkout markdown
17+
uses: actions/[email protected]
18+
19+
- name: Link Checker
20+
uses: lycheeverse/[email protected]
21+
with:
22+
# skip the jekyll files
23+
args: --verbose --no-progress --max-retries 5 --exclude-path './_includes/*.html' '**/*.md' '*.md'
24+
fail: true
25+
env:
26+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
27+
28+
md_linter:
29+
name: Lint markdown
30+
runs-on: ubuntu-22.04
31+
steps:
32+
- name: Checkout markdown
33+
uses: actions/[email protected]
34+
35+
- name: Lint markdown
36+
uses: DavidAnson/[email protected]
37+
with:
38+
config: '.markdownlint.yaml'
39+
globs: '**/*.md'
40+
41+
spell_checker:
42+
name: Check spelling
43+
runs-on: ubuntu-22.04
44+
steps:
45+
- name: Checkout markdown
46+
uses: actions/[email protected]
47+
48+
- name: spell_checker
49+
uses: rojopolis/[email protected]
50+
51+
export_docs:
52+
name: Export PDF and ePub
53+
runs-on: ubuntu-22.04
54+
needs: [link_checker, md_linter, spell_checker]
55+
steps:
56+
- name: Checkout markdown
57+
uses: actions/[email protected]
58+
59+
- name: Combine markdown
60+
run: |
61+
tail --lines=+14 -q $(find release -name "*[0-9]*.md" | sort) > release.markdown
62+
mkdir -p publish
63+
64+
- name: Export to pdf
65+
uses: docker://pandoc/latex:3.1
66+
with:
67+
args: >-
68+
--from=markdown
69+
--output=publish/OWASP_Developer_Guide.pdf
70+
--resource-path="release/assets/images:release/assets:release"
71+
release/title.pdf.yaml
72+
release.markdown
73+
74+
- name: Export to epub
75+
uses: docker://pandoc/latex:3.1
76+
with:
77+
args: >-
78+
--from=markdown
79+
--output=publish/OWASP_Developer_Guide.epub
80+
--resource-path="release/assets/images:release/assets:release"
81+
release/title.yaml
82+
release.markdown
83+
84+
- name: Save pdfs and epubs
85+
uses: actions/[email protected]
86+
with:
87+
name: export-docs
88+
path: publish

0 commit comments

Comments
 (0)