62 lines
1.7 KiB
YAML
62 lines
1.7 KiB
YAML
name: Build and publish
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths-ignore:
|
|
- '_data/webmention_io_*'
|
|
|
|
concurrency:
|
|
group: "pages"
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-24.04
|
|
permissions:
|
|
contents: write
|
|
pages: write
|
|
id-token: write
|
|
environment:
|
|
name: sloane.sh
|
|
url: https://sloane.sh
|
|
env:
|
|
JEKYLL_ENV: production
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: ruby/setup-ruby@v1
|
|
with:
|
|
bundler-cache: true
|
|
- uses: actions/configure-pages@v5
|
|
id: pages
|
|
- name: Configure Git
|
|
run: |
|
|
git config user.name "GitHub Actions Bot"
|
|
git config user.email "actions@github.com"
|
|
- run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
|
|
- uses: actions/upload-pages-artifact@v3
|
|
with:
|
|
name: github-pages-publish-1
|
|
- uses: actions/deploy-pages@v4
|
|
with:
|
|
artifact_name: github-pages-publish-1
|
|
- run: |
|
|
git add _data/webmention_io_*
|
|
git diff --staged --quiet || git commit -m "publish: ${{ github.sha }}"
|
|
git push origin main
|
|
- run: bundle exec jekyll webmention
|
|
- run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
|
|
- uses: actions/upload-pages-artifact@v3
|
|
with:
|
|
name: github-pages-publish-2
|
|
- uses: actions/deploy-pages@v4
|
|
with:
|
|
artifact_name: github-pages-publish-1
|
|
- run: |
|
|
git add _data/webmention_io_*
|
|
git diff --staged --quiet || git commit --amend --no-edit
|
|
git push origin main --force-with-lease
|