Skip to content

Push preview to master and deploy to live #6

Push preview to master and deploy to live

Push preview to master and deploy to live #6

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@v4
with:
ref: preview
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v3
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 }}