Skip to content

Add deploy github actions #1

Add deploy github actions

Add deploy github actions #1

Workflow file for this run

name: Deploy preview
on:
pull_request:
jobs:
deploy-preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Get last commit message
id: get_commit_message
run: echo "COMMIT_MESSAGE=$(git log -1 --pretty=%B)" >> $GITHUB_ENV
# https://github.com/marketplace/actions/netlify-actions
- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: './dist'
github-token: ${{ secrets.GITHUB_TOKEN }}
production-branch: main
deploy-message: ${{ env.COMMIT_MESSAGE }}
enable-pull-request-comment: false
netlify-config-path: ./netlify.toml
alias: preview-${{ github.event.number }}
github-deployment-environment: preview
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1