From 937de0219f73bcd34720241984c267e545a2780a Mon Sep 17 00:00:00 2001 From: sloane Date: Wed, 29 Jan 2025 12:05:42 -0500 Subject: [PATCH] update build and deploy workflow based on github example (#15) --- .github/workflows/publish.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 1f93a05..d0719a8 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -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