Skip to content

Update README.md

Update README.md #20

name: Build & Deploy
on:
pull_request:
branches: [ "master" ]
push:
branches: [ "master" ]
permissions:
contents: write
jobs:
build:
strategy:
matrix:
node-version: [20.x]
os: [ubuntu-latest]
runs-on: ${{matrix.os}}
# defaults:
# run:
# working-directory: ./packages/resizable-panes-react
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: |
npm install --legacy-peer-deps
- name: Lint/EsLint
run: |
npm run lint
- name: Resizable Core Build
run: |
npm run prod
working-directory: ./packages/resizable-core
- name: Resizable React Build
run: |
npm run prod
working-directory: ./packages/resizable-panes-react
- name: Resizable React Testing
run: |
npm test
working-directory: ./packages/resizable-panes-react
- name: Resizable React Check Coverage
run: |
npm run coverage
working-directory: ./packages/resizable-panes-react
- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v4
with:
path: ${{format('{0}/{1}', github.workspace, 'packages/resizable-panes-react/cypress/screenshots')}}
retention-days: 30
- name: Echo
run:
echo ${{format('{0}/{1}', github.workspace, 'packages/resizable-panes-react')}}
pwd
myVar=$(pwd)
echo $myVar
# - name: SonarCloud Scan
# uses: SonarSource/sonarcloud-github-action@master
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Demo App Build
run: |
npm run build
working-directory: ./packages/demo-app
- name: Demo App - Deploy to GitHub Pages
if: ${{ github.ref == 'refs/heads/master' }}
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: ~/work/resizable-panes/resizable-panes/packages/demo-app/docs
- name: Resizable React NPM Publish
if: ${{ github.ref == 'refs/heads/master' }}
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: ${{format('{0}/{1}', github.workspace, 'packages/resizable-panes-react')}}
- name: Resizable Js Build
run: |
npm run prod
working-directory: ./packages/resizable-panes-js
- name: Resizable JS NPM Publish
if: ${{ github.ref == 'refs/heads/master' }}
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: ${{format('{0}/{1}', github.workspace, 'packages/resizable-panes-js')}}