This repository was archived by the owner on Mar 27, 2023. It is now read-only.
File tree 2 files changed +6
-10
lines changed
2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -5,17 +5,13 @@ on: [push, pull_request]
5
5
jobs :
6
6
build :
7
7
runs-on : ubuntu-latest
8
- if : github.event_name == 'push' || github.event.pull_request.head.repo.full_name ! = 'vmware/clarity'
8
+ if : github.repository = = 'vmware/clarity'
9
9
10
10
steps :
11
11
- uses : actions/checkout@v2
12
12
- uses : actions/setup-node@v1
13
13
with :
14
14
node-version : ' 14.x'
15
- - uses : actions/cache@v2
16
- with :
17
- path : ' **/node_modules'
18
- key : ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}-${{ github.base_ref }}
19
15
- run : npm install
20
16
- run : npm run build
21
17
- run : npm run deploy
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
- mkdir -p logs
4
-
5
3
# This downloads a set of key-value env variables, but blocks any requests that aren't from GitHub Actions
6
4
curl -g https://us-central1-clarity-design-system.cloudfunctions.net/actions -o .env
7
5
# dotenv loads up the env variables into the shell, then deploys through Netlify
8
6
9
- # Deploy a preview that can be promoted to production when we are ready
10
- node -r dotenv/config -- ./node_modules/.bin/netlify deploy --json --dir=./dist/adoption --message=" Adoption Branch - Adoption Guide - $GITHUB_REF @$GITHUB_SHA " --site " adoption.clarity.design" > ./logs/adoption.clarity.design.netlify.json
11
- cat ./logs/adoption.clarity.design.netlify.json
7
+ [ " $GITHUB_REF " == " refs/head/adoption" ] &&
8
+ # Deploy to production
9
+ node -r dotenv/config -- ./node_modules/.bin/netlify deploy --json --dir=./dist/adoption --message=" $GITHUB_REF @$GITHUB_SHA " --prod ||
10
+ # Deploy a preview
11
+ node -r dotenv/config -- ./node_modules/.bin/netlify deploy --json --dir=./dist/adoption --message=" $GITHUB_REF @$GITHUB_SHA "
You can’t perform that action at this time.
0 commit comments