Skip to content

Merge branch 'ProjectDepot:main' into main #128

Merge branch 'ProjectDepot:main' into main

Merge branch 'ProjectDepot:main' into main #128

Workflow file for this run

name: Build and Deploy to GitHub Pages
on:
push:
branches:
- main
schedule:
- cron: '0 0 * * *' # Runs daily at midnight UTC
workflow_dispatch: # Allow manual triggering
permissions:
contents: write
jobs:
build_and_deploy_job:
runs-on: ubuntu-latest
env:
CI: true
name: Build and Deploy Job
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Fetch Repos
run: npm run fetch-data ${{ github.repository_owner }}
if: github.repository != 'ProjectDepot/SrcGallery'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build SrcGallery
run: npm run build
if: github.repository != 'ProjectDepot/SrcGallery'
env:
VITE_GITHUB_ACTOR: ${{ github.repository_owner }}
- name: Build Docs
run: npm run docs:build
if: github.repository == 'ProjectDepot/SrcGallery'
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ github.repository == 'ProjectDepot/SrcGallery' && './docs/.vitepress/dist' || './dist' }}