allow manual deploy #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and publish | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '_data/webmention_io_*' | |
workflow_dispatch: | |
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: collect webmentions for ${{ 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 -m "publish: update webmentions for ${{ github.sha }}" | |
git push origin main --force-with-lease |