Improve demos, with yarn workspaces
#22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- master | |
name: Build and Publish Demos | |
jobs: | |
demo: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 14.21.3 | |
- name: Cache node_modules | |
id: cache-modules | |
uses: actions/cache@v1 | |
with: | |
path: node_modules | |
key: ${{ runner.OS }}-build-${{ hashFiles('package.json') }} | |
- name: Install Dependencies | |
if: steps.cache-modules.outputs.cache-hit != 'true' | |
run: npm install | |
- name: Build lib | |
run: npm run build | |
- name: Build demo folder | |
run: | | |
cd demos | |
./build.sh | |
find ./dist | |
- name: Deploy 🚀 | |
uses: JamesIves/github-pages-deploy-action@releases/v3 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH: gh-pages | |
FOLDER: demos/dist | |
CLEAN: true |