Skip to content

Commit

Permalink
Replace Travis w/ GitHub actions (master) (#7947)
Browse files Browse the repository at this point in the history
  • Loading branch information
chaance authored Aug 13, 2021
1 parent 1aacf78 commit 51925de
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 53 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: release
on:
release:
types: [published]

jobs:
release:
if: github.repository == 'remix-run/react-router'
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]

steps:
- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Build
run: yarn build

- name: Test
run: yarn test

- name: Publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
node scripts/publish.js
27 changes: 27 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: test
on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]

steps:
- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Build
run: yarn build

- name: Test
run: yarn test
40 changes: 40 additions & 0 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: website
on:
push:
branches: [website]

jobs:
website:
if: github.repository == 'remix-run/react-router'
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]

steps:
- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Build
run: yarn build

- name: Test
run: yarn test

- name: Setup
run: |
echo "Deploying website to https://reactrouter.com/"
openssl aes-256-cbc -K $encrypted_70c5e56b421c_key -iv $encrypted_70c5e56b421c_iv -in website-deploy-key.enc -out website-deploy-key -d
chmod 600 website-deploy-key
eval $(ssh-agent -s)
ssh-add website-deploy-key
- name: Deploy
run: bash scripts/deploy-website.sh
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ node_modules/
npm-debug.log
lerna-debug.log

/.tsc-output/
/build/
/.changelog/
/packages/*/cjs/
/packages/*/esm/
Expand Down
53 changes: 0 additions & 53 deletions .travis.yml

This file was deleted.

0 comments on commit 51925de

Please sign in to comment.