Skip to content

Commit

Permalink
chore: add deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Bouquillon committed Jun 9, 2020
1 parent b7bf50d commit fbf9dbe
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,44 @@ jobs:
GIT_COMMITTER_NAME: ${{ secrets.GIT_AUTHOR_NAME }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

demo:
if: github.event_name == 'push' && github.ref == 'master'
runs-on: ubuntu-latest
steps:
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Get yarn cache directory path
id: init
shell: bash
run: |
echo "::set-output name=yarn_cache::$(yarn cache dir)"
#
echo "Node $(node --version)"
echo "Yarn $(yarn --version)"
- uses: actions/checkout@v2

- name: Cache Yarn packages
id: yarn_cache_packages
uses: actions/cache@v1
with:
path: ${{ steps.init.outputs.yarn_cache }}
key: ${{ runner.os }}-yarn_cache-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn_cache-
- name: Cache node_modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.os }}-${{ matrix.node-version }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node-version }}-yarn-
- name: Installing
run: yarn --frozen-lockfile --perfer-offline --link-duplicates

- name: Deploy demo
run: yarn deploy

0 comments on commit fbf9dbe

Please sign in to comment.