Skip to content

Commit

Permalink
add jekyll build into workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nnamtug committed Feb 20, 2024
1 parent 7ad96ed commit bc48c68
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
31 changes: 16 additions & 15 deletions .github/workflows/azure-static-web-apps-ashy-stone-0a97fa003.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Azure Static Web Apps CI/CD
name: Jekyll Build + Azure Static Web Apps CI/CD

on:
push:
Expand All @@ -10,20 +10,6 @@ on:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./
destination: ./_site
#- name: Upload artifact
#uses: actions/upload-pages-artifact@v3
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
Expand All @@ -33,6 +19,21 @@ jobs:
with:
submodules: true
lfs: false
- name: Setup Ruby
uses: ruby/setup-ruby@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.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
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
- name: Build with Jekyll
# Outputs to the './_site' directory by default
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: production

- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ _site/
# Ignore folders generated by Bundler
.bundle/
vendor/
**/*.swp

0 comments on commit bc48c68

Please sign in to comment.