Skip to content

siteleaf/actions-save-files

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 

Repository files navigation

siteleaf/actions-save-files

Action to save files from GitHub Actions to Siteleaf Preview

Example usage:

# .github/workflows/preview.yml

name: Build preview with Jekyll and Siteleaf

on:
  push:
    branches:
      - preview       # Build previews for "preview" branch
  pull_request:       # Build previews for PRs
  workflow_dispatch:  # Build manually from the Actions tab

permissions:
  contents: read
  id-token: write       # Required for siteleaf/actions-save-files
  pull-requests: write  # Required for auto Preview URL in PR comments
  
jobs:
  preview:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout branch
        uses: actions/checkout@v7
      
      - name: Setup Ruby           # Required only if using Jekyll
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: "3.2"      # Not needed with .ruby-version, .tool-versions, etc
          bundler-cache: true      # Runs 'bundle install' and caches installed gems
          
      - name: Build Jekyll site    # Replace with your custom build steps
        env:
          JEKYLL_ENV: staging
        run: |
          bundle exec jekyll build \
            --future \
            --unpublished \
            --drafts

      - name: Deploy to Siteleaf
        uses: siteleaf/actions-save-files@v1
        with:
          publish_dir: _site       # Optional (defaults to _site)
          compare_size_only: true  # Optional (faster)

About

Action to save files from GitHub Actions to Siteleaf Preview

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors