Skip to content

Commit

Permalink
[ci ]: github action for build home page and blog
Browse files Browse the repository at this point in the history
Signed-off-by: Bo-Wei Chen(BWbwchen) <[email protected]>
  • Loading branch information
BWbwchen committed Dec 21, 2023
1 parent 7bc3f93 commit 7383be9
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,29 @@ jobs:
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Build with Jekyll
- name: Build with Jekyll for Home page
uses: actions/jekyll-build-pages@v1
with:
source: ./
destination: ./_site
destination: ${{ github.workspace }}/_site
- name: Setup Ruby for Blog
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
with:
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
env:
BUNDLE_GEMFILE: ./blog/Gemfile
- name: Build with Jekyll for Blog
# Outputs to the './_site' directory by default
working-directory: ./blog
run: bundle exec jekyll build -s . -d ${{ github.workspace }}/_site/blog --baseurl "${{ steps.deployment.outputs.page_url }}/blog"
env:
JEKYLL_ENV: production
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ${{ github.workspace }}/_site

# Deployment job
deploy:
Expand Down

0 comments on commit 7383be9

Please sign in to comment.