update build and deploy workflow based on github example (#15)
Some checks are pending
Build and publish / build-and-deploy (push) Waiting to run

This commit is contained in:
sloane 2025-01-29 12:05:42 -05:00 committed by GitHub
parent 1284d930bc
commit 937de0219f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10,6 +10,8 @@ on:
jobs:
build-and-deploy:
runs-on: ubuntu-24.04
env:
JEKYLL_ENV: production
steps:
- uses: actions/checkout@v4
@ -18,25 +20,23 @@ jobs:
- 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
- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_site
- run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
- uses: actions/upload-pages-artifact@v3
- uses: actions/deploy-pages@v4
- 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
- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_site
- run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
- uses: actions/upload-pages-artifact@v3
- uses: actions/deploy-pages@v4
- run: |
git add _data/webmention_io_*
git diff --staged --quiet || git commit --amend --no-edit