Skip to content

πŸš€ Deploy Jekyll site to Pages #21

πŸš€ Deploy Jekyll site to Pages

πŸš€ Deploy Jekyll site to Pages #21

Workflow file for this run

name: πŸš€ Deploy Jekyll site to Pages
on:
#push:
# branches: ["main"]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
bundler-cache: true
- name: πŸ‘·πŸ»β€β™‚οΈ Setup Pages
uses: actions/configure-pages@v3
- name: πŸ“¦ Build site
run: bundle exec jekyll build
env:
JEKYLL_ENV: production
- name: ⬆️ Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./_site
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@v4
clear_cdn_cache:
needs: [ deploy ]
env:
POSTMAN_COLLECTION_BRANCH: main
POSTMAN_COLLECTION_FOLDER: scripts
CLOUDFLARE_WEBSITE: apihandyman.io
runs-on: ubuntu-latest
steps:
- name: ⬇️ Download Cloudflare Clear Cache Postman collection
uses: actions/checkout@main
with:
ref: ${{env.POSTMAN_COLLECTION_BRANCH}}
fetch-depth: 1
- name: πŸ’₯ Clear Cloudflare cache
run: |
docker run \
-v ${{ github.workspace }}/${{env.POSTMAN_COLLECTION_FOLDER}}:/etc/newman \
-t postman/newman:alpine run \
--global-var token=${{secrets.CLOUDFLARE_TOKEN}} \
--global-var website=${{env.CLOUDFLARE_WEBSITE}} \
cloudflare-clearcache.postman_collection.json