Skip to content

feat(root): add top navigation patterns compatible with React and web components #2113

feat(root): add top navigation patterns compatible with React and web components

feat(root): add top navigation patterns compatible with React and web components #2113

name: Branches
on:
workflow_dispatch:
push:
branches:
- "develop"
pull_request:
types: [opened, reopened, edited, synchronize]
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ic-design-system-static-analysis-tests:
name: "Static Analysis Tests"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: |
npm ci --legacy-peer-deps
- name: Lint site
run: |
npm run lint
- name: Audit
run: npm run audit
ic-design-system-deploy:
needs: [ic-design-system-static-analysis-tests]
if: ${{ github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'workflow_dispatch' || github.event_name == 'push' }}
name: "Deploy"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
lfs: true
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Extract branch name
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Build
run: |
BRANCH=${{ steps.extract_branch.outputs.branch }}
export ICDS_PREFIX=/branches/$BRANCH
npm ci --legacy-peer-deps
echo GATSBY_GA_TRACKING_ID=${{ secrets.GA_TRACKING_ID_DEV }} >> .env.production
echo GATSBY_GOOGLE_SEARCH_TOKEN=${{ secrets.GOOGLE_SEARCH_TOKEN }} >> .env.production
npm run build:prefixed
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
repository-name: mi6/ic-design-system-githubpages
folder: ./public
target-folder: ./branches/${{ steps.extract_branch.outputs.branch }}
token: ${{ secrets.IC_DESIGN_SYSTEM_QA }}