Skip to content

chore(deps-dev): Bump serve-static from 1.14.1 to 1.16.2 #347

chore(deps-dev): Bump serve-static from 1.14.1 to 1.16.2

chore(deps-dev): Bump serve-static from 1.14.1 to 1.16.2 #347

name: Build PR preview
on:
pull_request:
# To manage 'surge-preview' action teardown, add default event types + closed event type
types: [opened, synchronize, reopened, closed]
branches:
- master
paths:
- 'gulpfile.js'
- 'package.json'
- 'package-lock.json'
- 'gulp.d/**/*'
- 'src/**/*'
- 'preview-src/**/*'
- '.github/actions/build-setup/**/*'
- '.github/workflows/publish-pr-preview.yml'
permissions:
# surge-preview creates or updates PR comments about the deployment status
pull-requests: write
jobs:
build_preview:
runs-on: ubuntu-22.04
steps:
- uses: bonitasoft/actions/packages/surge-preview-tools@v3
id: surge-preview-tools
with:
surge-token: ${{ secrets.SURGE_TOKEN_DOC }}
- name: Checkout
uses: actions/checkout@v4
if: github.event.action != 'closed'
- name: Build Setup
uses: ./.github/actions/build-setup
if: github.event.action != 'closed'
- name: Build preview
if: github.event.action != 'closed'
run: npm run preview:build
- name: Upload artifact
if: github.event.action != 'closed' # Always upload to be able to test it locally
uses: actions/upload-artifact@v4
with:
name: bonita-theme-preview-pr-${{github.event.pull_request.number}}-${{github.sha}}
path: public
- name: Publish preview
uses: afc163/surge-preview@v1
if: steps.surge-preview-tools.outputs.can-run-surge-command == 'true'
env:
BONITA_THEME_URL: ${{ steps.surge-preview-tools.outputs.preview-url }}
with:
surge_token: ${{ secrets.SURGE_TOKEN_DOC }}
github_token: ${{ secrets.GITHUB_TOKEN }}
dist: public
failOnError: true
teardown: 'true'
build: echo "site already built"