From b0c885fc0c8c2d845c140a69d82e9e25f24f9fae Mon Sep 17 00:00:00 2001 From: greg pereira Date: Wed, 15 May 2024 14:04:37 -0700 Subject: [PATCH 1/2] removing setup pages step and corresponding injections to config.next.js Signed-off-by: greg pereira --- .github/workflows/nextjs.yml | 17 +++++++++-------- next.config.js | 1 + 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml index 9fcf64e6..138e313c 100644 --- a/.github/workflows/nextjs.yml +++ b/.github/workflows/nextjs.yml @@ -39,14 +39,6 @@ jobs: with: node-version: '20' cache: yarn - - name: Setup Pages - uses: actions/configure-pages@v4 - with: - # Automatically inject basePath in your Next.js configuration file and disable - # server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized). - # - # You may remove this line if you want to manage the configuration yourself. - static_site_generator: next - name: Restore cache uses: actions/cache@v4 with: @@ -62,6 +54,15 @@ jobs: run: yarn install - name: Lint check run: yarn lint + - name: Format check + run: yarn format:check + - name: Setup tmate session + if: ${{ failure() }} + uses: mxschmitt/action-tmate@v3.18 + timeout-minutes: 15 + with: + detached: false + limit-access-to-actor: true - name: Build with Next.js run: yarn build - name: Upload artifact diff --git a/next.config.js b/next.config.js index 80db9f3f..107d3ca2 100644 --- a/next.config.js +++ b/next.config.js @@ -4,6 +4,7 @@ const path = require('path'); // eslint-disable-line @typescript-eslint/no-var-r const nextConfig = { output: 'export', + basePath: '', reactStrictMode: true, compiler: { From 450cde7f18ea6f08a468e0fda086c0dd0248e882 Mon Sep 17 00:00:00 2001 From: greg pereira Date: Fri, 17 May 2024 07:48:02 -0700 Subject: [PATCH 2/2] running the linter Signed-off-by: greg pereira --- .github/dependabot.yml | 13 ++++++------- .github/workflows/actionlint.yml | 12 ++++++------ .github/workflows/docs.yml | 10 +++++----- .markdownlint-cli2.yaml | 8 ++++---- 4 files changed, 21 insertions(+), 22 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a17e0a4a..c42b0530 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -3,15 +3,14 @@ # GitHub Dependabot configuration file version: 2 updates: - # Maintain dependencies for GitHub Actions - - package-ecosystem: "github-actions" - directory: "/" + - package-ecosystem: 'github-actions' + directory: '/' schedule: - interval: "daily" + interval: 'daily' # Maintain dependencies for JS/yarn - - package-ecosystem: "npm" - directory: "/" + - package-ecosystem: 'npm' + directory: '/' schedule: - interval: "daily" + interval: 'daily' diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml index 6fad273a..88bed2de 100644 --- a/.github/workflows/actionlint.yml +++ b/.github/workflows/actionlint.yml @@ -4,12 +4,12 @@ name: Lint GitHub Actions workflows on: push: branches: - - "main" + - 'main' paths: - '.github/workflows/*.ya?ml' pull_request: branches: - - "main" + - 'main' paths: - '.github/workflows/*.ya?ml' @@ -27,22 +27,22 @@ jobs: actionlint: runs-on: ubuntu-latest steps: - - name: "Harden Runner" + - name: 'Harden Runner' uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 with: egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs - - name: "Checkout" + - name: 'Checkout' uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 with: fetch-depth: 0 - - name: "Download actionlint" + - name: 'Download actionlint' id: get_actionlint run: | bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/2d26fef7e97b8ab345791f5ade3252da47d083e3/scripts/download-actionlint.bash) - - name: "Check workflow files" + - name: 'Check workflow files' run: | echo "::add-matcher::.github/workflows/matchers/actionlint.json" ${{ steps.get_actionlint.outputs.executable }} -color diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 77db9a27..a85e689b 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -5,14 +5,14 @@ name: Lint Markdown documents on: push: branches: - - "main" + - 'main' paths: - '**/*.md' - '.markdownlint-cli2.yaml' - '.github/workflows/docs.yml' # This workflow pull_request: branches: - - "main" + - 'main' paths: - '**/*.md' - '.markdownlint-cli2.yaml' @@ -32,15 +32,15 @@ jobs: markdown-lint: runs-on: ubuntu-latest steps: - - name: "Harden Runner" + - name: 'Harden Runner' uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 with: egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs - - name: "Checkout" + - name: 'Checkout' uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 with: fetch-depth: 0 - - name: "Check Markdown documents" + - name: 'Check Markdown documents' uses: DavidAnson/markdownlint-cli2-action@b4c9feab76d8025d1e83c653fa3990936df0e6c8 # v16.0.0 with: globs: '**/*.md' diff --git a/.markdownlint-cli2.yaml b/.markdownlint-cli2.yaml index 1104379c..3bd53f11 100644 --- a/.markdownlint-cli2.yaml +++ b/.markdownlint-cli2.yaml @@ -6,8 +6,8 @@ config: no-duplicate-header: false single-trailing-newline: false globs: - - "**/*.md" + - '**/*.md' ignores: - - ".tox/**" - - "venv/**" - - ".venv/**" + - '.tox/**' + - 'venv/**' + - '.venv/**'