Skip to content

Automatically trigger workflow #1

Automatically trigger workflow

Automatically trigger workflow #1

Workflow file for this run

name: Deploy Branch Preview
on:
push:
branches:
- preview-infra
workflow_dispatch:
inputs:
commit_message:
description: 'Optional: Commit message describing the update'
required: false
default: 'Update branch previews'
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout preview-infra Branch
uses: actions/checkout@v4
with:
ref: preview-infra
fetch-depth: 1
- name: Prepare Deployment
run: |
# Copy everything to deploy directory
mkdir -p deploy-out
# Copy HTML files
cp index.html deploy-out/
cp viewer.html deploy-out/
# Copy staging directory with all branches
cp -r staging deploy-out/
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: deploy-out
branch: gh-pages
clean: false
target-folder: .
commit-message: ${{ github.event.inputs.commit_message }}