Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

docs: setup redirect #637

docs: setup redirect

docs: setup redirect #637

Workflow file for this run

name: Deploy
on:
push:
branches:
- production
- alpha
- beta
- vue3
- next
- next-vue3
jobs:
deploy:
concurrency: ${{ github.workflow }}-${{ github.ref }}
runs-on: ubuntu-latest
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
steps:
- name: Check out branch
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '20'
- name: parse branch from ref
id: branch
run: echo ::set-output name=BRANCH::${GITHUB_REF/refs\/heads\//}
- name: Set npm token
run: npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}
- name: Install dependencies
run: npm ci
- name: Run unit tests
run: npm run test
- name: Run Linters
run: npm run lint
- name: Build storybook
if: ${{ github.ref == 'refs/heads/production' || github.ref == 'refs/heads/vue3' || github.ref == 'refs/heads/next' }}
run: npm run storybook:build
- name: Deploy production
if: ${{ github.ref == 'refs/heads/production' }}
run: npm publish
- name: Deploy ${{ steps.branch.outputs.BRANCH }}
if: ${{ github.ref != 'refs/heads/production' }}
run: npm publish --tag ${{ steps.branch.outputs.BRANCH }}
- name: Set registry to github packages
run: npm config set @dialpad:registry https://npm.pkg.github.com
- name: Set github auth token
run: npm config set //npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}
- name: Deploy production to github packages
if: ${{ github.ref == 'refs/heads/production' }}
run: npm publish
- name: Deploy ${{ steps.branch.outputs.BRANCH }} to github packages
if: ${{ github.ref != 'refs/heads/production' }}
run: npm publish --tag ${{ steps.branch.outputs.BRANCH }}
- name: Deploy to GitHub Pages (Production)
if: ${{ github.ref == 'refs/heads/production' && always() }}
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: storybook-static
clean-exclude: |
deploy-previews
vue3
dialtone8
- name: Deploy to GitHub Pages (Vue 3)
if: ${{ github.ref == 'refs/heads/vue3' && always() }}
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: storybook-static
target-folder: vue3
- name: Deploy to GitHub Pages (Dialtone 8)
if: ${{ github.ref == 'refs/heads/next' && always() }}
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: storybook-static
target-folder: dialtone8
- name: Github Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release --extends ./release-ci.config.cjs