From 40cb2e412a192d4177ee76422b6368533da02588 Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Sun, 19 Mar 2023 16:20:18 +0800 Subject: [PATCH] :wrench: Chore: update repo checkout config in GitHub worlkflows --- .github/workflows/algolia-atomic.yml | 21 +++++++++++---------- .github/workflows/codeql-analysis.yml | 11 +++++++---- assets/css/_partials/_single/_code.scss | 4 +++- docs | 2 +- 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/.github/workflows/algolia-atomic.yml b/.github/workflows/algolia-atomic.yml index 58d3176e..a8891ed4 100644 --- a/.github/workflows/algolia-atomic.yml +++ b/.github/workflows/algolia-atomic.yml @@ -5,35 +5,36 @@ on: branches: - master paths: - - 'docs' + - "docs" workflow_dispatch: jobs: algolia-atomic: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Check out repository code + uses: actions/checkout@v3 with: - submodules: true # Fetch Hugo themes (true OR recursive) + submodules: recursive # Fetch Hugo themes (true OR recursive) fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod - name: Setup Hugo uses: peaceiris/actions-hugo@v2 with: - hugo-version: 'latest' + hugo-version: "latest" extended: true - name: Build run: | - npm install - npm run build + npm install + npm run build - name: Update Algolia Index (en) env: ALGOLIA_APP_ID: YKOM6PKLUY ALGOLIA_ADMIN_KEY: ${{ secrets.ALGOLIA_ADMIN_KEY }} - ALGOLIA_INDEX_NAME: 'index.en' - ALGOLIA_INDEX_FILE: './docs/public/index.json' + ALGOLIA_INDEX_NAME: "index.en" + ALGOLIA_INDEX_FILE: "./docs/public/index.json" run: | npm run algolia @@ -41,7 +42,7 @@ jobs: env: ALGOLIA_APP_ID: YKOM6PKLUY ALGOLIA_ADMIN_KEY: ${{ secrets.ALGOLIA_ADMIN_KEY }} - ALGOLIA_INDEX_NAME: 'index.zh-cn' - ALGOLIA_INDEX_FILE: './docs/public/zh-cn/index.json' + ALGOLIA_INDEX_NAME: "index.zh-cn" + ALGOLIA_INDEX_FILE: "./docs/public/zh-cn/index.json" run: | npm run algolia diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 2e274e2b..3765e179 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -19,7 +19,7 @@ on: branches: - master schedule: - - cron: '30 18 * * 5' + - cron: "30 18 * * 5" jobs: analyze: @@ -29,14 +29,17 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'javascript' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] + language: [ "javascript" ] + # CodeQL supports [ "cpp", "csharp", "go", "java", "javascript", "python" ] # Learn more: # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed steps: - - name: Checkout repository + - name: Check out repository code uses: actions/checkout@v3 + with: + submodules: true # Fetch Hugo themes (true OR recursive) + fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/assets/css/_partials/_single/_code.scss b/assets/css/_partials/_single/_code.scss index 560f840b..65321799 100644 --- a/assets/css/_partials/_single/_code.scss +++ b/assets/css/_partials/_single/_code.scss @@ -181,9 +181,11 @@ pre { .lntd:first-child { min-width: 1.6rem; text-align: right; + position: sticky; + left: 0; pre { - padding-right: 0; + // padding-right: 0; } } // code content diff --git a/docs b/docs index d59eddda..174a8ee1 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit d59eddda7b7c106b269756f4235187a4085a39ef +Subproject commit 174a8ee1ddccff0bf3163ec82bf0f058fdadc1a0