Skip to content

Push preview to master and deploy to live #8

Push preview to master and deploy to live

Push preview to master and deploy to live #8

name: Push preview to master and deploy to live
on: workflow_dispatch
jobs:
deploy-preview:
name: Push preview to master and deploy to live
runs-on: ubuntu-latest
environment: deploy
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: preview
persist-credentials: true
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 22
- name: Build the site
run: ./build.sh
- name: Push preview to master
run: git push origin preview:master
- name: Deploy to Netlify
run: ./deploy.sh --prod
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}