Skip to content

Create pages-deploy.yml #189

Create pages-deploy.yml

Create pages-deploy.yml #189

Workflow file for this run

name: "Build and Deploy"
on:
push:
branches:
- main
- master
paths-ignore:
- .gitignore
- README.md
- LICENSE
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
# If using the 'assets' git submodule from Chirpy Starter, uncomment above
# (See: https://github.com/cotes2020/chirpy-starter/tree/main/assets)
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true
- name: Install Jekyll dependencies
run: gem install bundler && bundle install
- name: Build Jekyll site
run: bundle exec jekyll build
deploy:
environment:
name: cloudflare-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to Cloudflare Pages
uses: cloudflare/[email protected]
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
script: "wrangler publish"