Push preview to master and deploy to live #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |