Merge pull request #14 from Spinoco/feature/break-on-minimum-height #107
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: Spinoco webchat plugin github actions | |
on: [ push ] | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
install: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: docker://node:18.19.0-buster-slim | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: node_modules | |
key: ${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: ${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
- run: npm i --production=false --legacy-peer-deps | |
lint: | |
needs: [ install ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: docker://node:18.19.0-buster-slim | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: node_modules | |
key: ${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: ${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
- run: npm run eslint | |
build-main: | |
needs: [ lint ] | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: docker://node:18.19.0-buster-slim | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: node_modules | |
key: ${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: ${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
- run: npm run build | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: pages-main | |
path: dist | |
build-staging: | |
needs: [ lint ] | |
if: github.ref == 'refs/heads/staging' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: docker://node:18.19.0-buster-slim | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: node_modules | |
key: ${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: ${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
- run: npm run build | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: pages-staging | |
path: dist | |
deploy-main: | |
needs: [ build-main ] | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
environment: main | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: pages-main | |
path: . | |
- uses: actions/configure-pages@v1 | |
- uses: actions/upload-pages-artifact@v1 | |
with: | |
path: . | |
- uses: actions/deploy-pages@v1 | |
deploy-staging: | |
needs: [ build-staging ] | |
if: github.ref == 'refs/heads/staging' | |
runs-on: ubuntu-latest | |
environment: staging | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: pages-staging | |
path: . | |
- uses: actions/configure-pages@v1 | |
- uses: actions/upload-pages-artifact@v1 | |
with: | |
path: . | |
- uses: actions/deploy-pages@v1 |