Files
Scriberr/.github/workflows/deploy-landing.yml
rishikanthc 3e5cb9bdb3 fixes CI/CD
2025-08-29 11:46:26 -07:00

45 lines
961 B
YAML

name: Build Landing Site to Docs
on:
push:
branches: [ main ]
paths:
- 'web/landing/**'
- '.github/workflows/deploy-landing.yml'
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Build landing site
working-directory: web/landing
run: |
npm ci
npm run build
- name: Deploy to docs folder
run: |
rm -rf docs
mv web/landing/dist docs
- name: Commit and push
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add docs
git diff --staged --quiet || git commit -m "Deploy landing site to docs folder"
git push