Skip to content

Commit

Permalink
Remove Vercel deployment and update domain for links. (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-barry authored May 12, 2022
1 parent e6293b5 commit 1e5fc64
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 581 deletions.
95 changes: 44 additions & 51 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ name: CI
on: [push]
env:
CI: true
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}

jobs:
build:
Expand All @@ -16,62 +13,58 @@ jobs:
node: [12, 14, 16]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v1

- name: Setup Node.js for use with actions
uses: actions/[email protected]
with:
version: ${{ matrix.node }}
- name: Setup Node.js for use with actions
uses: actions/[email protected]
with:
version: ${{ matrix.node }}

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Node.js dependencies
run: |
if ! [ -d "./node_modules" ]; then
yarn install --frozen-lockfile
fi
- name: Install Node.js dependencies
run: |
if ! [ -d "./node_modules" ]; then
yarn install --frozen-lockfile
fi
- name: Run lint
run: yarn lint
- name: Run lint
run: yarn lint

- name: Test types
run: npx tsc -p . --noEmit
- name: Test types
run: npx tsc -p . --noEmit

- name: Run tests
run: yarn test
- name: Run tests
run: yarn test

- name: Build
run: yarn build && yarn build:docs
- name: Build
run: yarn build && yarn build:docs

- name: Setup for deploy
run: |
set -ex
- name: Setup for deploy
run: |
set -ex
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
npm whoami
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
npm whoami
vercel -t $VERCEL_TOKEN whoami
# prerelease versions must have a '-' to be released
- name: Publish unstable
if: "startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '-') && matrix.node == 12"
run: |
npm publish --tag next
# prerelease versions must have a '-' to be released
- name: Publish unstable
if: "startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '-') && matrix.node == 12"
run: |
npm publish --tag next
vercel -t $VERCEL_TOKEN
# latest tags must not have a prerelease number
- name: Publish
if: "startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-') && matrix.node == 12"
run: |
npm publish
vercel -t $VERCEL_TOKEN --prod
# latest tags must not have a prerelease number
- name: Publish
if: "startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-') && matrix.node == 12"
run: |
npm publish
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ node_modules
*.log
coverage
docs
.vercel
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.github
.vercel
coverage
docs
src
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ npm install @orthly/context

**Table of Contents**

* [Documentation](https://orthly-context.vercel.app)
* [Documentation](https://orthly-context.meetdandy.com/)
* [Examples](https://codesandbox.io/s/orthly-context-examples-od2bd?file=/README.md)
* [License](#license)

Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
"jest": "^27.1.1",
"prettier": "^2.3.2",
"typedoc": "^0.22.1",
"typescript": "^4.4.2",
"vercel": "^23.1.2"
"typescript": "^4.4.2"
},
"dependencies": {
"uuid": "^8.3.2"
Expand Down
Loading

0 comments on commit 1e5fc64

Please sign in to comment.