Skip to content

Commit

Permalink
use jekyll-theme-chirpy-7.2.4\.github\workflows\starter\pages-deploy.…
Browse files Browse the repository at this point in the history
…yml as default .github\workflows\jekyll-gh-pages.yml
  • Loading branch information
wangguanran committed Jan 8, 2025
1 parent 58ee5eb commit 3445e14
Showing 1 changed file with 39 additions and 17 deletions.
56 changes: 39 additions & 17 deletions .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,66 @@
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: Deploy Jekyll with GitHub Pages dependencies preinstalled

name: "Build and Deploy"
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
branches:
- main
- master
paths-ignore:
- .gitignore
- README.md
- LICENSE

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: false
cancel-in-progress: true

jobs:
# Build job
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 Pages
uses: actions/configure-pages@v5
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
id: pages
uses: actions/configure-pages@v4

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
source: ./
destination: ./_site
- name: Upload artifact
ruby-version: 3.3
bundler-cache: true

- name: Build site
run: bundle exec jekyll b -d "_site${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: "production"

- name: Test site
run: |
bundle exec htmlproofer _site \
\-\-disable-external \
\-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/"
- name: Upload site artifact
uses: actions/upload-pages-artifact@v3
with:
path: "_site${{ steps.pages.outputs.base_path }}"

# Deployment job
deploy:
environment:
name: github-pages
Expand Down

0 comments on commit 3445e14

Please sign in to comment.