Skip to content

Commit

Permalink
Create julian-test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ju-Skinner authored and kajabi-bot committed Aug 18, 2023
1 parent 7af6562 commit 08af607
Showing 1 changed file with 118 additions and 0 deletions.
118 changes: 118 additions & 0 deletions .github/workflows/julian-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: 'Release and Deploy v2'

on:
workflow_dispatch:
# push:
# branches:
# - main

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
setup:

runs-on: ubuntu-latest

steps:
- name: Clone Sage-Lib Repo
uses: actions/checkout@v3
with:
# pulls all commits (needed for lerna / semantic release to correctly version)
fetch-depth: "0"
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7.7'

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.20.0

- name: Set NPM Config
run: npm config set '//npm.pkg.github.com/:_authToken' '${{ secrets.ACCESS_TOKEN }}'

- name: Unsafe Perm set
run: npm config set unsafe-perm true

- name: Add safe directory
run: git config --global --add safe.directory /__w/sage-lib/sage-lib

- name: Set Bot Email
run: git config user.email "[email protected]"

- name: Set Bot Name
run: git config user.name "Kajabi Automation Bot"

- name: Cache Node modules
uses: actions/cache@v3
id: sage-lib-node-modules
env:
cache-name: sage-lib-node-modules
with:
path: ./node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}-v1

- name: Install packages
if: steps.sage-lib-node-modules.outputs.cache-hit != true
run: yarn install --frozen-lockfile

lint:
needs: [setup]
runs-on: ubuntu-latest

steps:
- name: Lint
run: yarn lint

test:
needs: [setup]
runs-on: ubuntu-latest

steps:
- name: Test
run: yarn test

build:
needs: [setup]
runs-on: ubuntu-latest

steps:
- name: Build
run: yarn build

publish:
needs: [build]
runs-on: ubuntu-latest

steps:
- name: Lerna Boostrap
run: npx lerna bootstrap --ci

- name: Lerna Publish
run: npx lerna publish --registry github --yes

deploy-sites:
needs: publish
runs-on: ubuntu-latest

steps:
- name: Deploy Documentation Site
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
HEROKU_DOCS_APP_NAME: ${{ secrets.HEROKU_DOCS_APP_NAME }}
run: yarn docs:deploy

- name: Deploy Storybook Site
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
HEROKU_STORYBOOK_APP_NAME: ${{ secrets.HEROKU_STORYBOOK_APP_NAME }}
run: yarn storybook:deploy

- name: SassDocs Site Deploy
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
HEROKU_SASSDOCS_APP_NAME: ${{ secrets.HEROKU_SASSDOCS_APP_NAME }}
run: yarn sassdocs:deploy

0 comments on commit 08af607

Please sign in to comment.