Merge pull request #195 from solfacil/feat/update-email-regex #219
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
name: Build & deploy | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- 'package.json' | |
- 'CHANGELOG.md' | |
jobs: | |
deploy-bump-version: | |
name: Bump version and Deploy 🚀 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Configure git | |
uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.REGISTRY_PERSONAL_TOKEN }} | |
- name: cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: '**/node_modules' | |
key: node_modules-${{ hashFiles('**/yarn.lock') }} | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 14.18.2 | |
registry-url: https://registry.npmjs.org/ | |
- name: Conventional Changelog Action | |
id: changelog | |
uses: TriPSs/conventional-changelog-action@v3 | |
with: | |
github-token: ${{ secrets.REGISTRY_PERSONAL_TOKEN }} | |
output-file: "false" | |
- name: Create Release | |
uses: actions/create-release@v1 | |
if: ${{ steps.changelog.outputs.skipped == 'false' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.REGISTRY_PERSONAL_TOKEN }} | |
with: | |
tag_name: ${{ steps.changelog.outputs.tag }} | |
release_name: ${{ steps.changelog.outputs.tag }} | |
body: ${{ steps.changelog.outputs.clean_changelog }} | |
- name: Install and Build | |
run: | | |
yarn install | |
yarn build-storybook | |
- name: Deploy Storybook | |
uses: JamesIves/github-pages-deploy-action@3.6.2 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH: gh-pages | |
FOLDER: storybook-static | |
CLEAN: true | |
TARGET_FOLDER: . | |
- name: Checkout Git repo/update | |
run: git pull origin main | |
- name: Deploy NPM | |
run: npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
NPM_CONFIG_OTP: "" |