Skip to content

Commit 092cd4f

Browse files
committed
actions: Add a github action to generate jekyll
1 parent aaebad1 commit 092cd4f

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

.github/workflows/jekyll.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
2+
name: Deploy OpenRISC newlib site to Pages
3+
4+
on:
5+
# Runs on pushes targeting the gh-pages branch
6+
push:
7+
branches: ["gh-pages"]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20+
concurrency:
21+
group: "pages"
22+
cancel-in-progress: false
23+
24+
jobs:
25+
# Build job
26+
build:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
- name: Setup Ruby
32+
# https://github.com/ruby/setup-ruby/releases/tag/v1.207.0
33+
uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4
34+
with:
35+
ruby-version: '3.1' # Not needed with a .ruby-version file
36+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
37+
cache-version: 0 # Increment this number if you need to re-download cached gems
38+
- name: Setup Pages
39+
id: pages
40+
uses: actions/configure-pages@v5
41+
- name: Build with Jekyll
42+
# Outputs to the './_site' directory by default
43+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
44+
env:
45+
JEKYLL_ENV: production
46+
- name: Upload artifact
47+
# Automatically uploads an artifact from the './_site' directory by default
48+
uses: actions/upload-pages-artifact@v3
49+
50+
# Deployment job
51+
deploy:
52+
environment:
53+
name: github-pages
54+
url: ${{ steps.deployment.outputs.page_url }}
55+
runs-on: ubuntu-latest
56+
needs: build
57+
steps:
58+
- name: Deploy to GitHub Pages
59+
id: deployment
60+
uses: actions/deploy-pages@v4
61+

0 commit comments

Comments
 (0)