Skip to content

Feat/angular 16 upgrade (#124) #20

Feat/angular 16 upgrade (#124)

Feat/angular 16 upgrade (#124) #20

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Build, Test and Deploy
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-test:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
# Shallow clones should be disabled for a better relevancy of sonar analysis
fetch-depth: 0
# This installs node and npm for us
- uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
# Lint and Build
- name: Install, Lint and Build 🔧
run: |
npm install
npm run-script lint
npm run-script build-deployment
# Run tests
- name: Test
run: |
npm run-script test:all
# Code quality checks
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
# Needed to get PR information, if any
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v2
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build-test
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3