summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorSerghei Iakovlev <egrep@protonmail.ch>2022-07-28 23:48:42 +0200
committerSerghei Iakovlev <egrep@protonmail.ch>2022-07-29 00:14:33 +0200
commita57ee6219b58be3be72bfbc9fad451670c136efd (patch)
tree82b6a27a657acf74d0d002bd187c2f3e2ac4823b /.github
parentcfad20c63ed1b355238cc5fc528bdb290f375936 (diff)
downloadgohugo-theme-ed-a57ee6219b58be3be72bfbc9fad451670c136efd.tar.gz
Fix GH workflow to run CodeQL Analyze
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/codeql-analysis.yml56
1 files changed, 39 insertions, 17 deletions
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 57131a8..6344188 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -44,20 +44,42 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3
- - name: Initialize CodeQL
- uses: github/codeql-action/init@v2
- with:
- languages: ${{ matrix.language }}
-
- - name: Autobuild
- uses: github/codeql-action/autobuild@v2
-
- - name: Build site
- run: |
- hugo --verbose --source=exampleSite --buildDrafts --buildFuture
- env:
- HUGO_RESOURCEDIR: '../resources'
- HUGO_ENV: development
-
- - name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v2
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v2
+ with:
+ languages: ${{ matrix.language }}
+
+ - name: Autobuild
+ uses: github/codeql-action/autobuild@v2
+
+ - name: Setup Hugo
+ uses: peaceiris/actions-hugo@v2
+ with:
+ hugo-version: '0.101.0'
+ extended: true
+
+ - name: Setup Node
+ uses: actions/setup-node@v3
+ with:
+ node-version: '14'
+
+ - name: Cache dependencies
+ uses: actions/cache@v2
+ with:
+ path: ~/.npm
+ key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
+ restore-keys: |
+ ${{ runner.os }}-node-
+
+ - name: Install a project with a clean slate
+ run: npm ci
+
+ - name: Build site
+ run: |
+ hugo --verbose --source=exampleSite --buildDrafts --buildFuture
+ env:
+ HUGO_RESOURCEDIR: '../resources'
+ HUGO_ENV: development
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v2