Merge pull request #2453 from axa-ch-webhub-cloud/bugfix/GITHUB-2452-… #212
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: CI | |
on: | |
push: | |
branches: [ "develop" ] | |
pull_request: | |
branches: [ "develop" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Use Node.js 16.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16.x' | |
cache: 'npm' | |
- name: 'NPM Authentication' | |
run: npm config set //npm.pkg.github.com/:_authToken="$GITHUB_TOKEN" | |
env: | |
GITHUB_TOKEN: ${{ secrets.TECHNICAL_USER_TOKEN }} | |
- name: 'Install (with lib build included)' | |
run: npm ci | |
- name: 'Build Dist' | |
run: npm run build-dist | |
- name: 'Check if there are no uncommitted files' | |
run: npm run check-for-uncommitted-files | |
- name: 'Lint and prettier check' | |
run: npm run lint | |
- name: 'Build static storybook' | |
run: npm run build-storybook | |
- name: 'Run unit and e2e tests' | |
run: npm run test:ci | |
- name: 'Gh-Pages - Push Featurebranch' | |
run: git config --global user.email "$GITHUB_EMAIL" && git config --global user.name "$GITHUB_USER" && bash ./scripts/branch-deployment.sh | |
env: | |
GITHUB_TOKEN: ${{ secrets.TECHNICAL_USER_TOKEN }} | |
GITHUB_EMAIL: ${{ secrets.TECHNICAL_USER_EMAIL }} | |
GITHUB_USER: ${{ secrets.TECHNICAL_USER_NAME }} | |
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} |