Translate release-pt-br.yaml and chapter 04 to Brazilian Portuguese #212
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
name: Pull request pipeline | |
# checks are only on the draft and root directories because that is where the changes should be | |
on: | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
env: | |
RESOURCE_PATH: release/assets/images:release/assets:release:assets/images:assets/images/logos:assets/images/logos/publish | |
# for security reasons the github actions are pinned to specific release versions | |
jobs: | |
link_checker: | |
name: Link checker | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout markdown | |
uses: actions/checkout@v4.2.0 | |
- name: Link Checker | |
uses: lycheeverse/lychee-action@v2.2.0 | |
with: | |
# skip the jekyll files under '_includes' directory, only check the draft and root directories | |
args: >- | |
--no-progress | |
--max-retries 5 | |
--exclude-path './_includes/*.html' | |
'./draft/**/*.md' | |
'*.md' | |
fail: true | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
md_linter: | |
name: Lint markdown | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout markdown | |
uses: actions/checkout@v4.2.0 | |
- name: Lint markdown | |
uses: DavidAnson/markdownlint-cli2-action@v18.0.0 | |
with: | |
config: '.markdownlint.yaml' | |
globs: 'draft/**/*.md' | |
# only check the draft directory, that is where the changes should be | |
spell_checker: | |
name: Check spelling | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout markdown | |
uses: actions/checkout@v4.2.0 | |
- name: spell_checker | |
uses: rojopolis/spellcheck-github-actions@0.45.0 | |
export_draft: | |
name: Export epub and pdf (Draft) | |
runs-on: ubuntu-24.04 | |
needs: [link_checker, md_linter, spell_checker] | |
steps: | |
- name: Checkout markdown | |
uses: actions/checkout@v4.2.0 | |
- name: Combine markdown | |
run: | | |
mkdir publish | |
mkdir assets/images/logos/publish | |
mkdir draft/temp | |
tail --lines=+14 -q $(find draft -name "*[0-9]*.md" | sort) > draft/temp/draft.markdown | |
sed -i "s/{: .image-right }/{height=180px}/g" draft/temp/draft.markdown | |
sed -i "s/{: .image-right-small }/{height=26px}/g" draft/temp/draft.markdown | |
- name: Export to pdf | |
uses: docker://pandoc/latex:3.1 | |
with: | |
args: >- | |
--from=markdown | |
--output=publish/OWASP_Developer_Guide.draft.pdf | |
--resource-path=${{ env.RESOURCE_PATH }} | |
-fmarkdown-implicit_figures | |
draft/title.pdf.yaml | |
draft/temp/draft.markdown | |
- name: Export to epub | |
uses: docker://pandoc/latex:3.1 | |
with: | |
args: >- | |
--from=markdown | |
--output=publish/OWASP_Developer_Guide.draft.epub | |
--resource-path=${{ env.RESOURCE_PATH }} | |
-fmarkdown-implicit_figures | |
draft/title.yaml | |
draft/temp/draft.markdown | |
- name: Save pdfs and epubs | |
uses: actions/upload-artifact@v4.4.0 | |
with: | |
name: export-draft | |
path: publish |