From 51b92202c7c9d92a687a7bd71587e0383794d332 Mon Sep 17 00:00:00 2001 From: No Date: Fri, 12 Jul 2024 20:28:25 -0400 Subject: [PATCH] Fix PDF Action --- .github/workflows/convert-to-pdf.yml | 15 +++++ .github/workflows/create-pdf.yml | 24 -------- .github/workflows/mega-linter.yml | 61 ------------------- ...{vt-scan.yml => upload-to-virustotal.yaml} | 0 CHANGELOG.md | 2 +- 5 files changed, 16 insertions(+), 86 deletions(-) create mode 100644 .github/workflows/convert-to-pdf.yml delete mode 100644 .github/workflows/create-pdf.yml delete mode 100644 .github/workflows/mega-linter.yml rename .github/workflows/{vt-scan.yml => upload-to-virustotal.yaml} (100%) diff --git a/.github/workflows/convert-to-pdf.yml b/.github/workflows/convert-to-pdf.yml new file mode 100644 index 00000000..0834122e --- /dev/null +++ b/.github/workflows/convert-to-pdf.yml @@ -0,0 +1,15 @@ +# .github/workflows/convert-to-pdf.yml + +name: '📚 Docs to PDF' +# This workflow is triggered on pushes to the repository. +on: + pull_request: + push: + + uses: misaelnieto/web_to_pdf_action@master + with: + webPageURL: https://anonymousplanet.org/guide.html + outputFile: export/guide.pdf + usePuppeteer: true + useScreen: true + pdfOptions: '{"format": "Letter", "margin": {"top": "10mm", "left": "10mm", "right": "10mm", "bottom": "10mm"}}' \ No newline at end of file diff --git a/.github/workflows/create-pdf.yml b/.github/workflows/create-pdf.yml deleted file mode 100644 index 64a15c6d..00000000 --- a/.github/workflows/create-pdf.yml +++ /dev/null @@ -1,24 +0,0 @@ -on: - push: - paths: - - 'doc/**' - -name: '✏️ Create PDF' - -jobs: - makepdfs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: mkrakowitzer/actions-makepdfs@master - if: github.ref == 'refs/heads/main' - with: - markdown_dir: export - output_dir: export - media_dir: - required: true - default: 'images/' - - uses: actions/upload-artifact@v4 - with: - name: platform-architecture-docs - path: export diff --git a/.github/workflows/mega-linter.yml b/.github/workflows/mega-linter.yml deleted file mode 100644 index 96337452..00000000 --- a/.github/workflows/mega-linter.yml +++ /dev/null @@ -1,61 +0,0 @@ -# MegaLinter GitHub Action configuration file -# More info at https://megalinter.io -name: '✏️ MegaLinter' - -permissions: - contents: read - -on: - workflow_dispatch: - pull_request: - branches: - - main - push: - branches: - - main - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }} - cancel-in-progress: true - -# Comment env block if you do not want to apply fixes -env: - # Apply linter fixes configuration - APPLY_FIXES: all - - # Decide which event triggers application of fixes in a commit or a PR - APPLY_FIXES_EVENT: pull_request, push - - # If APPLY_FIXES is used, defines if the fixes are directly committed (commit) - # or posted in a PR (pull_request) - APPLY_FIXES_MODE: commit - -jobs: - megalinter: - name: MegaLinter - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - # MegaLinter - - name: Run MegaLinter - id: ml - uses: oxsecurity/megalinter/flavors/documentation@v7.13.0 - env: - VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DISABLE: COPYPASTE,SPELL,HTML - DISABLE_LINTERS: REPOSITORY_GITLEAKS,CSS_SCSS_LINT,BASH_SHELLCHECK,JSON_JSONLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_GIT_DIFF,YAML_V8R,MARKDOWN_MARKDOWNLINT_NO_TRAILING_SPACES,MARKDOWN_MARKDOWNLINT_NO_DUPLICATE_HEADING - DISABLE_ERRORS_LINTERS: CSS_STYLELINT,MARKDOWN_MARKDOWN_LINK_CHECK,YAML_YAMLLINT,DOCKERFILE_HADOLINT,REPOSITORY_TRIVY,REPOSITORY_CHECKOV,REPOSITORY_GITLEAKS - MARKDOWN_MARKDOWNLINT_FILTER_REGEX_EXCLUDE: '(export/|briar\.md|donations\.md|LICENSE\.md)' - - # Upload MegaLinter artifacts - - name: Archive MegaLinter reports - uses: actions/upload-artifact@v4 - if: always() # Ensure artifacts are always uploaded - with: - name: MegaLinter reports - path: | - megalinter-reports - mega-linter.log \ No newline at end of file diff --git a/.github/workflows/vt-scan.yml b/.github/workflows/upload-to-virustotal.yaml similarity index 100% rename from .github/workflows/vt-scan.yml rename to .github/workflows/upload-to-virustotal.yaml diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bef00cf..b117d268 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ v1.2.0 - Rotate GPG/PGP keys (See [Open Collective key rotation](https://opencollective.com/anonymousplanetorg/updates/key-rotation-update)) -- Switch to Megalinter in [#344](https://github.com/Anon-Planet/thgtoa/pull/344) +- Switch to Megalinter to diagnose repeatable PDF failures v1.1.9