Skip to content

Commit f8fe52e

Browse files
authored
Initialise Github Pages Push
1 parent f85e65a commit f8fe52e

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

.github/workflows/jekyll.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
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: Write ✍️ Writing to Pages 📜
8+
9+
on:
10+
# Runs on pushes targeting the default branch
11+
push:
12+
branches: ["master"]
13+
paths:
14+
- 'writing/**'
15+
16+
# Allows you to run this workflow manually from the Actions tab
17+
workflow_dispatch:
18+
19+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
20+
permissions:
21+
contents: read
22+
pages: write
23+
id-token: write
24+
25+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
26+
# However, do NOT cancel in-progress runs as we want to allow these production deployments 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@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.0
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@v4
47+
- name: Build with Jekyll
48+
# Outputs to the './_site' directory by default
49+
with:
50+
source: ./writing
51+
destination: ./writing/_site
52+
env:
53+
JEKYLL_ENV: production
54+
- name: Upload artifact
55+
# Automatically uploads an artifact from the './_site' directory by default
56+
uses: actions/upload-pages-artifact@v3
57+
58+
# Deployment job
59+
deploy:
60+
environment:
61+
name: github-pages
62+
url: ${{ steps.deployment.outputs.page_url }}
63+
runs-on: ubuntu-latest
64+
needs: build
65+
steps:
66+
- name: Deploy to GitHub Pages
67+
id: deployment
68+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)