Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Deployment Preview

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
deploy-preview:
name: Build and Deploy Preview
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: 'latest'
extended: true

- name: Install Node.js dependencies
run: |
if [ -f package.json ]; then
npm ci
fi

- name: Build Hugo site
run: hugo --minify --baseURL "/"

- name: Deploy Preview to Netlify
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@varsha-0007 we are moving off from netlify to GitHub Pages

uses: nwtgck/actions-netlify@v3
with:
publish-dir: './public'
production-deploy: false
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy preview for PR #${{ github.event.number }}"
alias: deploy-preview-${{ github.event.number }}
enable-pull-request-comment: true
enable-commit-comment: false
overwrites-pull-request-comment: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 10
Loading