Skip to content

chore: updating a bunch of storybook files #170

chore: updating a bunch of storybook files

chore: updating a bunch of storybook files #170

Workflow file for this run

# # Name of workflow
name: Main CI/CD
# When workflow is triggered
on:
# Trigger on push to main
push:
branches: [main]
paths-ignore:
- 'package.json'
- 'CHANGELOG.md'
# Trigger on PR
pull_request:
branches: [main]
paths-ignore:
- 'package.json'
- 'CHANGELOG.md'
# Allows manual trigger
workflow_dispatch:
# Jobs to carry out
jobs:
test_and_build:
name: Test and Build App
runs-on: ubuntu-latest
environment: dev
env:
API_KEY: ${{ secrets.API_KEY }}
steps:
# Get code from repo
- name: Checkout code
uses: actions/checkout@v1
# Install NodeJS
- name: Use Node.js 18.x
uses: actions/setup-node@v1
with:
node-version: 18.x
# Run npm install and build on our code
- name: Run Install
run: npm install
- name: Run Make Config
run: npm run config
# - name: Run lint
# run: npm run lint
# - name: Run test
# run: npm run test
- name: Run build
run: npm run build
deployment_dev:
name: Deployment (Dev)
runs-on: ubuntu-latest
environment: dev
env:
API_KEY: ${{ secrets.API_KEY }}
needs:
- test_and_build
steps:
- name: Checkout code
uses: actions/checkout@v1
# Install NodeJS
- name: Use Node.js 18.x
uses: actions/setup-node@v1
with:
node-version: 18.x
# Run npm install and build on our code
- run: npm install
- run: npm run config
- run: npm run build
- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: './dist/apps/destiny-clan-dashboard'
production-deploy: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.DEV_NETLIFY_SITE_ID }}
increment_version:
runs-on: ubuntu-latest
needs:
- test_and_build
steps:
- uses: actions/checkout@v1
with:
token: ${{ secrets.TOKEN_ACTION }}
ref: ${{ github.ref_name }}
- name: Bump version and push tag
uses: TriPSs/[email protected]
with:
github-token: ${{ secrets.TOKEN_ACTION }}
git-message: 'chore(release): {version}'
git-branch: 'main'
preset: 'angular'
skip-on-empty: 'false'
tag-prefix: ''
output-file: 'CHANGELOG.md'
deployment_stage:
name: Deployment (Stage)
# Operating system to run job on
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
environment: stage
env:
API_KEY: ${{ secrets.API_KEY }}
needs:
- test_and_build
- increment_version
# Steps in job
steps:
# Get code from repo
- name: Checkout code
uses: actions/checkout@v1
# Install NodeJS
- name: Use Node.js 18.x
uses: actions/setup-node@v1
with:
node-version: 18.x
# Run npm install and build on our code
- run: npm install
- run: npm run config
- run: npm run build
# Deploy to Netlify using our production secrets
- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: './dist/apps/destiny-clan-dashboard'
production-deploy: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.STAGE_NETLIFY_SITE_ID }}
deployment_prod:
name: Deployment (Prod)
runs-on: ubuntu-latest
# Operating system to run job on
if: github.ref == 'refs/heads/main'
environment: production
env:
API_KEY: ${{ secrets.API_KEY }}
needs:
- test_and_build
- increment_version
- deployment_stage
# Steps in job
steps:
# Get code from repo
- name: Checkout code
uses: actions/checkout@v1
# Install NodeJS
- name: Use Node.js 18.x
uses: actions/setup-node@v1
with:
node-version: 18.x
# Run npm install and build on our code
- run: npm install
- run: npm run config
- run: npm run build
# Deploy to Netlify using our production secrets
- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: './dist/apps/destiny-clan-dashboard'
production-deploy: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
- name: Discord notification
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: Ilshidur/action-discord@master
with:
args: '{{ EVENT_PAYLOAD.repository.full_name }} has been deployed to Production.'