Update day_logs.yml #47
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Jekyll and Deploy Pages | |
on: | |
push: | |
branches: ["main"] | |
workflow_dispatch: | |
# 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. | |
concurrency: | |
group: "jekyll_build" | |
cancel-in-progress: false | |
permissions: | |
contents: write # For pushing changes | |
pages: write # For deploying to GitHub Pages | |
id-token: write # Required by actions/deploy-pages | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.1' # Specify your Ruby version | |
bundler-cache: true # Caches the gems for faster builds | |
- name: Install Jekyll and plugins | |
run: | | |
cd petitbonhomme | |
gem install jekyll | |
gem install bundler | |
bundle install # Assumes there is a Gemfile in the repository | |
- name: Build with Jekyll | |
run: | | |
cd petitbonhomme | |
rake build | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: "petitbonhomme/_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 |