Skip to content

Commit

Permalink
Update jekyll to gh pages workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hlindqvist committed Sep 8, 2024
1 parent f63b064 commit 5ac5f30
Showing 1 changed file with 38 additions and 15 deletions.
53 changes: 38 additions & 15 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,46 @@
name: Build and deploy Jekyll site to GitHub Pages
name: Deploy Jekyll site to Pages

on:
push:
branches:
- master
branches: ["master"]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

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

jobs:
github-pages:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
restore-keys: |
${{ runner.os }}-gems-
- uses: helaili/jekyll-action@v2
- name: Checkout
uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
#token: $PAGES_GITHUB_TOKEN
target_branch: gh-pages
ruby-version: '3.1'
bundler-cache: true
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Build site
run: bundle exec jekyll build
env:
JEKYLL_ENV: production
- name: Upload artifact
uses: actions/upload-pages-artifact@v1

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@v2

0 comments on commit 5ac5f30

Please sign in to comment.