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.
# 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
name: Deploy Jekyll site to Cloudflare Pages
on:
# Runs on pushes targeting the default branch
@@ -41,6 +35,7 @@ jobs:
ruby-version: '3.4.1' # Not needed with a .ruby-version file
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
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
@@ -49,6 +44,7 @@ jobs:
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: production
- name: Push image optimizations onto main
continue-on-error: true
run: |
@@ -58,18 +54,11 @@ jobs:
git add assets/img
git commit -m "chore: optimize images"
git push
- name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v3
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
- name: Publish to Cloudflare Pages
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy _site --project-name=${{ vars.CLOUDFLARE_PROJECT_NAME }}