-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from OutpostHQ/release
release
- Loading branch information
Showing
4 changed files
with
10 additions
and
161 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,51 +87,3 @@ jobs: | |
exitOnceUploaded: true | ||
autoAcceptChanges: true | ||
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | ||
|
||
deploy-docs: | ||
name: 'Deploy Latest documentation' | ||
needs: publish | ||
if: needs.publish.outputs.published == 'true' | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: Docs Production | ||
url: ${{ steps.publish_docs.outputs.NETLIFY_PREVIEW_URL }} | ||
env: | ||
NODE_OPTIONS: --max-old-space-size=4096 | ||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
|
||
- uses: actions/cache@v2 | ||
name: Download storybook cache | ||
with: | ||
path: | | ||
**/node_modules/.cache | ||
key: ${{ runner.os }}-storybook-${{ github.run_id }} | ||
restore-keys: | | ||
${{ runner.os }}-storybook | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'pnpm' | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Build Docs | ||
run: pnpm build-docs --quiet | ||
|
||
- name: Deploy docs to Netlify | ||
uses: South-Paw/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
netlify-auth-token: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
netlify-site-id: ${{ secrets.NETLIFY_SITE_ID }} | ||
build-dir: ./storybook-docs |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,38 +68,6 @@ jobs: | |
prNumber: context.payload.pull_request.number | ||
}) | ||
tests: | ||
name: 'Tests & lint' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
|
||
- uses: actions/cache@v2 | ||
name: Download eslint cache | ||
with: | ||
path: | | ||
**/.eslintcache | ||
key: ${{ runner.os }}-eslint | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'pnpm' | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Run the lint | ||
run: pnpm lint | ||
|
||
- name: Run the tests | ||
run: pnpm test -- --no-cache | ||
|
||
deploy-chromatic: | ||
name: 'Prepare Storybook for review & tests' | ||
runs-on: ubuntu-latest | ||
|
@@ -162,68 +130,3 @@ jobs: | |
repo: context.repo, | ||
prNumber: context.payload.pull_request.number | ||
}) | ||
deploy-docs: | ||
name: 'Prepare Docs for the Review' | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: Docs staging | ||
url: ${{ steps.publish_docs.outputs.preview-url }} | ||
env: | ||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
|
||
- uses: actions/cache@v2 | ||
name: Download storybook cache | ||
with: | ||
path: | | ||
**/node_modules/.cache | ||
key: ${{ runner.os }}-storybook-${{ github.run_id }} | ||
restore-keys: | | ||
${{ runner.os }}-storybook | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'pnpm' | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Build Docs | ||
run: pnpm build-docs --quiet | ||
|
||
- name: Deploy docs to Netlify | ||
id: publish_docs | ||
uses: South-Paw/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
netlify-auth-token: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
netlify-site-id: ${{ secrets.NETLIFY_SITE_ID }} | ||
draft: true | ||
build-dir: ./storybook-docs | ||
comment-on-commit: true | ||
|
||
- name: Comment PR | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
const setMessage = require('${{ github.workspace }}/scripts/ci/set-message') | ||
await setMessage({ | ||
header: "## 🏗 Docs are successfully deployed!", | ||
body: ` | ||
👀 Preview: ${{ steps.publish_docs.outputs.preview-url }} | ||
`, | ||
github, | ||
repo: context.repo, | ||
prNumber: context.payload.pull_request.number | ||
}) |
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
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