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:
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue