diff --git a/.github/workflows/playground.yml b/.github/workflows/playground.yml new file mode 100644 index 0000000000..42b812ffc2 --- /dev/null +++ b/.github/workflows/playground.yml @@ -0,0 +1,35 @@ +# From https://docs.featurepeek.com/github-actions/ +name: Build playground +on: push +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Use Node.js + uses: actions/setup-node@v1 + with: + node-version: '12.x' + - name: Cache node modules + uses: actions/cache@v1 + with: + path: node_modules + key: ${{ runner.OS }}-build-${{ hashFiles('yarn.lock') }} + restore-keys: | + ${{ runner.OS }}-build-${{ env.cache-name }}- + ${{ runner.OS }}-build- + ${{ runner.OS }}- + - name: Install dependencies + run: yarn --frozen-lockfile + - name: Build Weaverbird module + run: yarn build-bundle + - name: Copy weaverbird script into dist folder + run: cp --remove-destination dist/weaverbird.browser.js playground/dist/weaverbird.browser.js + - name: Copy weaverbird CSS into dist folder + run: cp --remove-destination dist/weaverbird.css playground/dist/playground.css + - name: Copy playground script into dist folder + run: cp --remove-destination playground/app.js playground/dist/app.js + - name: Ping FeaturePeek + run: bash <(curl -s https://peek.run/ci) -a playground + env: + CI: true diff --git a/.github/workflows/storybook.yml b/.github/workflows/storybook.yml index ee4e2468a1..c24f68ae95 100644 --- a/.github/workflows/storybook.yml +++ b/.github/workflows/storybook.yml @@ -23,12 +23,12 @@ jobs: ${{ runner.OS }}-build- ${{ runner.OS }}- - name: Install dependencies - run: yarn + run: yarn --frozen-lockfile - name: Build Weaverbird components bundle run: yarn storybook:bundle - name: Build storybook run: yarn storybook:build - name: Ping FeaturePeek - run: bash <(curl -s https://peek.run/ci) + run: bash <(curl -s https://peek.run/ci) -a storybook env: CI: true diff --git a/peek.yml b/peek.yml index 3b8a2c90bf..3afd74d3f7 100644 --- a/peek.yml +++ b/peek.yml @@ -1,5 +1,9 @@ version: 2 -main: +playground: + type: static + path: /playground/dist + +storybook: type: static path: /.storybook/dist