Add Cloudflare Pages step to deployment
Some checks failed
Deploy Jekyll site to Cloudflare Pages / build (push) Failing after 2m27s

This commit is contained in:
2026-09-03 12:58:08 +00:00
parent 690f690faa
commit 4f6d9d8ab6

View File

@@ -1,10 +1,4 @@
# This workflow uses actions that are not certified by GitHub. name: Deploy Jekyll site to Cloudflare Pages
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: Deploy Jekyll site to Pages
on: on:
# Runs on pushes targeting the default branch # Runs on pushes targeting the default branch
@@ -41,6 +35,7 @@ jobs:
ruby-version: '3.4.1' # Not needed with a .ruby-version file ruby-version: '3.4.1' # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically bundler-cache: true # runs 'bundle install' and caches installed gems automatically
cache-version: 0 # Increment this number if you need to re-download cached gems cache-version: 0 # Increment this number if you need to re-download cached gems
- name: Setup Pages - name: Setup Pages
id: pages id: pages
uses: actions/configure-pages@v5 uses: actions/configure-pages@v5
@@ -49,6 +44,7 @@ jobs:
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
env: env:
JEKYLL_ENV: production JEKYLL_ENV: production
- name: Push image optimizations onto main - name: Push image optimizations onto main
continue-on-error: true continue-on-error: true
run: | run: |
@@ -58,18 +54,11 @@ jobs:
git add assets/img git add assets/img
git commit -m "chore: optimize images" git commit -m "chore: optimize images"
git push git push
- name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v3
# Deployment job - name: Publish to Cloudflare Pages
deploy: uses: cloudflare/wrangler-action@v3
environment: with:
name: github-pages apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
url: ${{ steps.deployment.outputs.page_url }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
runs-on: ubuntu-latest command: pages deploy _site --project-name=${{ vars.CLOUDFLARE_PROJECT_NAME }}
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5