Skip to content

Merge pull request #841 from terrestris/dependabot/npm_and_yarn/types… #774

Merge pull request #841 from terrestris/dependabot/npm_and_yarn/types…

Merge pull request #841 from terrestris/dependabot/npm_and_yarn/types… #774

Workflow file for this run

name: Update gh-pages (latest)
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout sources 🔰
uses: actions/checkout@v2
- name: Setup Node.js 16 🧮
uses: actions/setup-node@v1
with:
node-version: 16
- name: Cache Node.js modules 💾
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Install dependencies ⏬
run: npm ci
- name: Build artifacts 🏗️
run: npm run build
- name: Deploy (to latest) 🚀
uses: JamesIves/github-pages-deploy-action@v4.2.5
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: build
target-folder: latest
sonarqube:
name: SonarQube Trigger
runs-on: ubuntu-latest
steps:
- name: Checkout sources 🔰
uses: actions/checkout@v2
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: Setup Node.js 16 🧮
uses: actions/setup-node@v1
with:
node-version: 16
- name: Cache Node.js modules 💾
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Install dependencies ⏬
run: npm ci
- name: Test code ✅
run: npm run test
env:
CI: true
- name: SonarQube Scan 🔬
uses: kitabisa/sonarqube-action@v1.2.0
with:
host: ${{ secrets.SONARQUBE_HOST }}
login: ${{ secrets.SONARQUBE_TOKEN }}