Skip to content

Commit fbf9dbe

Browse files
author
Julien Bouquillon
committed
chore: add deploy workflow
1 parent b7bf50d commit fbf9dbe

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/main.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,44 @@ jobs:
8585
GIT_COMMITTER_NAME: ${{ secrets.GIT_AUTHOR_NAME }}
8686
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8787
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
88+
89+
demo:
90+
if: github.event_name == 'push' && github.ref == 'master'
91+
runs-on: ubuntu-latest
92+
steps:
93+
- name: Set up Node.js ${{ matrix.node-version }}
94+
uses: actions/setup-node@v1
95+
with:
96+
node-version: ${{ matrix.node-version }}
97+
98+
- name: Get yarn cache directory path
99+
id: init
100+
shell: bash
101+
run: |
102+
echo "::set-output name=yarn_cache::$(yarn cache dir)"
103+
#
104+
echo "Node $(node --version)"
105+
echo "Yarn $(yarn --version)"
106+
- uses: actions/checkout@v2
107+
108+
- name: Cache Yarn packages
109+
id: yarn_cache_packages
110+
uses: actions/cache@v1
111+
with:
112+
path: ${{ steps.init.outputs.yarn_cache }}
113+
key: ${{ runner.os }}-yarn_cache-${{ hashFiles('yarn.lock') }}
114+
restore-keys: |
115+
${{ runner.os }}-yarn_cache-
116+
- name: Cache node_modules
117+
uses: actions/cache@v1
118+
with:
119+
path: node_modules
120+
key: ${{ runner.os }}-${{ matrix.node-version }}-yarn-${{ hashFiles('yarn.lock') }}
121+
restore-keys: |
122+
${{ runner.os }}-${{ matrix.node-version }}-yarn-
123+
124+
- name: Installing
125+
run: yarn --frozen-lockfile --perfer-offline --link-duplicates
126+
127+
- name: Deploy demo
128+
run: yarn deploy

0 commit comments

Comments
 (0)