Skip to content

Merge pull request #118 from samuel-skean/main #14

Merge pull request #118 from samuel-skean/main

Merge pull request #118 from samuel-skean/main #14

Workflow file for this run

# Sample workflow for building jekyll website
name: Build With Jekyll
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3.5'
bundler-cache: true
cache-version: 0
- name: Build
run: bundle exec jekyll build
env:
JEKYLL_ENV: production
- name: Upload
uses: actions/upload-artifact@v4
with:
name: site
path: _site
overwrite: true
# Push job
push:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: gh-pages
- name: Delete
run : rm -rf /tmp/site
- name: Download
uses: actions/download-artifact@v4
with:
name: site
path: /tmp/site
- name: Sync
run: rsync -avh --delete --exclude .git /tmp/site/ .
- name: Push
run: |
git status
git add .
git config --global user.name 'Deploy Bot'
git config --global user.email 'deploy-bot@jsonlines.org'
git commit --allow-empty -m 'Automated Deployment'
git push