Skip to content

chore: fix eslint config #4484

chore: fix eslint config

chore: fix eslint config #4484

name: Generate Site Preview
on:
pull_request:
# To manage 'surge-preview' action teardown, add default event types + closed event type
types: [opened, synchronize, reopened, closed]
branches:
- main
paths:
- '.github/workflows/generate-site-preview.yml'
- 'src/**/*'
- 'static/**/*'
- 'package.json'
- 'package-lock.json'
- 'gatsby-*.ts*'
- '.nvmrc'
permissions:
# surge-preview: PR comments
pull-requests: write
jobs:
site_preview:
runs-on: ubuntu-20.04
steps:
- uses: bonitasoft/actions/packages/surge-preview-tools@v3
id: surge-preview-tools
with:
surge-token: ${{ secrets.SURGE_TOKEN }}
- uses: actions/checkout@v4
if: github.event.action != 'closed'
- name: Build Setup
if: github.event.action != 'closed'
uses: ./.github/actions/build-setup
- name: create .env.production file
if: github.event.action != 'closed'
run: |
touch .env.production
echo GATSBY_GA_MEASUREMENT_ID =${{ secrets.TEST_GA_MEASUREMENT_ID }} >> .env.production
- name: Publish Site preview
if: steps.surge-preview-tools.outputs.can-run-surge-command == 'true'
uses: afc163/surge-preview@v1
with:
surge_token: ${{ secrets.SURGE_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
dist: public
failOnError: true
teardown: 'true'
build: |
npm run build