Skip to content

Deploy Jekyll site to Pages #594

Deploy Jekyll site to Pages

Deploy Jekyll site to Pages #594

Workflow file for this run

name: Deploy Jekyll site to Pages
on:
push:
branches: ["main"]
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
all-in-one:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3.6"
bundler-cache: true
- id: pages
uses: actions/configure-pages@v5
- name: Build with Jekyll
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: production
- name: Debug outgoing before webmention
run: |
echo "=== OUTGOING BEFORE ==="
ls -R _data/webmentions || true
tail -n 200 _data/webmentions/outgoing.yml || echo "No outgoing file"
- uses: actions/upload-pages-artifact@v3
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
- name: Send webmentions
run: bundle exec jekyll webmention
env:
JEKYLL_ENV: production
- name: Debug after webmention
run: |
echo "=== OUTGOING AFTER ==="
tail -n 200 _data/webmentions/outgoing.yml || echo "No outgoing file"
echo "=== RECEIVED AFTER ==="
tail -n 200 _data/webmentions/received.yml || echo "No received file"
- name: Commit webmentions
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add -A _data/webmentions
if git diff --cached --quiet; then
echo "No changes to commit"
exit 0
fi
git commit -m "Update webmentions"
git push --force-with-lease origin main