Skip to content

Commit

Permalink
Update GitHub Pages actions
Browse files Browse the repository at this point in the history
  • Loading branch information
minkezhang committed Nov 19, 2024
1 parent 3e7819f commit df2be2e
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 15 deletions.
53 changes: 39 additions & 14 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,53 @@ name: Publish Blog

on:
push:
branches: [ main ]
branches: [ "main" ]

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
publish:
name: Publish Blog
build:
name: Build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v4
with:
submodules: 'recursive'
token: ${{ secrets.TOKEN }}

- uses: actions/[email protected]
- uses: ruby/setup-ruby@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.0
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
restore-keys: |
${{ runner.os }}-gems-
ruby-version: '3.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

- uses: helaili/[email protected]
with:
token: ${{ secrets.TOKEN }}
jekyll_src: '.'
gem_src: '.'
- id: pages
uses: actions/configure-pages@v5

- run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: production

# Automatically uploads an artifact from the './_site' directory by default
- uses: actions/upload-pages-artifact@v3

deploy:
name: Deploy
runs-on: ubuntu-latest

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

needs: build

permissions:
pages: write
id-token: write

steps:
- id: deployment
uses: actions/deploy-pages@v4

0 comments on commit df2be2e

Please sign in to comment.