Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Commit

Permalink
build: remove curl script and add github secret for NETLIFY_AUTH_TOKEN
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Hippely <mhippely@vmware.com>
  • Loading branch information
hippee-lee committed Jan 26, 2022
1 parent d866681 commit 2ee3d53
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'vmware/clarity'
if: github.repository == 'vmware/clarity'

steps:
- uses: actions/checkout@v2
Expand All @@ -30,3 +30,4 @@ jobs:
env:
CI: true
NETLIFY_SITE_ID: 03fce0dd-9568-4ab2-a3ea-211d856989db
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
16 changes: 1 addition & 15 deletions scripts/website.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
#!/usr/bin/env bash

echo "Download key-value env variables"
# This downloads a set of key-value env variables, but blocks any requests that aren't from GitHub Actions
curl -g https://us-central1-clarity-design-system.cloudfunctions.net/actions -o .env
# dotenv loads up the env variables into the shell, then deploys through Netlify

echo "Deploy a preview that can be promoted to clarity.design when we are ready"
# Deploy a preview that can be promoted to production when we are ready
node -r dotenv/config -- ./node_modules/.bin/netlify deploy --json --dir=./dist/website --message="Website - $GITHUB_REF@$GITHUB_SHA" --site "clarity.design"

# echo "Deploy a preview that can be promoted to next.clarity.design when we are ready"
# # Deploy a version to https://next.clarity.design as 'production'
# node -r dotenv/config -- ./node_modules/.bin/netlify deploy --json --dir=./dist/website --message="Website - $GITHUB_REF@$GITHUB_SHA" --site "next.clarity.design" > ./logs/next.clarity.design.netlify.json

# echo "Clarity Design Netlify"
# cat ./logs/clarity.design.netlify.json
./node_modules/.bin/netlify deploy --json --dir=./dist/website --message="Website - $GITHUB_REF@$GITHUB_SHA" --site "clarity.design"

# echo "Clarity Next Design Netlify"
# cat ./logs/next.clarity.design.netlify.json

0 comments on commit 2ee3d53

Please sign in to comment.