Skip to content

Commit 02935d1

Browse files
committed
Add own workflow.
1 parent 24c8c20 commit 02935d1

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

.github/workflows/jekyll.yml

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

0 commit comments

Comments
 (0)