Merge pull request #124 from harrel56/dependabot/npm_and_yarn/example… #144
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
name: build | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ master ] | |
jobs: | |
build-lib: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- run: npm i | |
working-directory: ./main | |
- run: npm run build | |
working-directory: ./main | |
build-examples-release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- run: npm i | |
working-directory: ./examples | |
- run: npm run build:release | |
working-directory: ./examples | |
- run: npm run test | |
working-directory: ./examples | |
- name: Setup Pages | |
uses: actions/configure-pages@v1 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: './examples/build' | |
deploy-examples-release: | |
needs: build-examples-release | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 | |
build-examples-next: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- run: npm run preinstall:next | |
working-directory: ./examples | |
- run: npm i | |
working-directory: ./examples | |
- run: npm run build:next | |
working-directory: ./examples | |
- run: npm run test | |
working-directory: ./examples |