-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (59 loc) · 1.78 KB
/
publish.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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