update build and deploy workflow based on github example (#15)
Some checks are pending
Build and publish / build-and-deploy (push) Waiting to run
Some checks are pending
Build and publish / build-and-deploy (push) Waiting to run
This commit is contained in:
parent
1284d930bc
commit
937de0219f
1 changed files with 10 additions and 10 deletions
20
.github/workflows/publish.yaml
vendored
20
.github/workflows/publish.yaml
vendored
|
@ -10,6 +10,8 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
build-and-deploy:
|
build-and-deploy:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
|
env:
|
||||||
|
JEKYLL_ENV: production
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
@ -18,25 +20,23 @@ jobs:
|
||||||
- uses: ruby/setup-ruby@v1
|
- uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
bundler-cache: true
|
bundler-cache: true
|
||||||
|
- uses: actions/configure-pages@v5
|
||||||
|
id: pages
|
||||||
- name: Configure Git
|
- name: Configure Git
|
||||||
run: |
|
run: |
|
||||||
git config user.name "GitHub Actions Bot"
|
git config user.name "GitHub Actions Bot"
|
||||||
git config user.email "actions@github.com"
|
git config user.email "actions@github.com"
|
||||||
- run: bundle exec jekyll build
|
- run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
|
||||||
- uses: peaceiris/actions-gh-pages@v3
|
- uses: actions/upload-pages-artifact@v3
|
||||||
with:
|
- uses: actions/deploy-pages@v4
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
publish_dir: ./_site
|
|
||||||
- run: |
|
- run: |
|
||||||
git add _data/webmention_io_*
|
git add _data/webmention_io_*
|
||||||
git diff --staged --quiet || git commit -m "publish: ${{ github.sha }}"
|
git diff --staged --quiet || git commit -m "publish: ${{ github.sha }}"
|
||||||
git push origin main
|
git push origin main
|
||||||
- run: bundle exec jekyll webmention
|
- run: bundle exec jekyll webmention
|
||||||
- run: bundle exec jekyll build
|
- run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
|
||||||
- uses: peaceiris/actions-gh-pages@v3
|
- uses: actions/upload-pages-artifact@v3
|
||||||
with:
|
- uses: actions/deploy-pages@v4
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
publish_dir: ./_site
|
|
||||||
- run: |
|
- run: |
|
||||||
git add _data/webmention_io_*
|
git add _data/webmention_io_*
|
||||||
git diff --staged --quiet || git commit --amend --no-edit
|
git diff --staged --quiet || git commit --amend --no-edit
|
||||||
|
|
Loading…
Reference in a new issue