Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

contentful

contentful #752

Workflow file for this run

name: 'Webhook Build trigger'
on:
- repository_dispatch
- workflow_dispatch
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
- name: Install dependencies
run: yarn install --immutable
- name: Build app
run: yarn run build
env:
CMS_CRUD: ${{ secrets.CMS_CRUD }}
CONTENTFUL_SPACE: ${{ github.event.client_payload.spaceId || secrets.CONTENTFUL_SPACE}}
CONTENTFUL_TOKEN: ${{ secrets.CONTENTFUL_TOKEN }}
GA_TRACKING_ID: ${{ secrets.GA_TRACKING_ID }}
TAG_MANAGER_ID: ${{ secrets.TAG_MANAGER_ID }}
FATHOM_SITE_ID: ${{ secrets.FATHOM_SITE_ID }}
GOOGLE_SITE_VERIFICATION_META_CONTENT: ${{ secrets.GOOGLE_SITE_VERIFICATION_META_CONTENT }}
GATSBY_CONTACT_US_ENDPOINT_URI: ${{ secrets.CONTACT_US_ENDPOINT_URI }}
CONTENTFUL_ENVIRONMENT: ${{ github.event.client_payload.environment || 'master'}}
CONTENTFUL_HOST: ${{ github.event.client_payload.host || 'cdn.contentful.com' }}
NODE_ENV: production
- name: Deploy to Netlify
id: deploy
uses: nwtgck/actions-netlify@v2
with:
publish-dir: './public'
functions-dir: './functions'
production-branch: master
# production-deploy: Deploy as Netlify production deploy (default: false)
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: ${{ github.event.pull_request.title }}
enable-pull-request-comment: true
enable-commit-comment: false
enable-commit-status: false
overwrites-pull-request-comment: true
github-deployment-environment: ${{ github.event.client_payload.environment }}
fails-without-credentials: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}