Skip to content

Commit 3aad0ec

Browse files
committed
add explicit build and deploy gh actions
- Explicit actions allows for pinning dependencies for consistent builds. Signed-off-by: Derek Worthen <[email protected]>
1 parent a0b63a8 commit 3aad0ec

File tree

3 files changed

+52
-1
lines changed

3 files changed

+52
-1
lines changed

.github/workflows/ci.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- name: Setup Ruby
19+
uses: ruby/setup-ruby@v1
20+
with:
21+
bundler-cache: true
22+
23+
- name: Build site
24+
run: |
25+
bundle exec jekyll build
26+
27+
- name: Upload GH Pages Artifact
28+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
29+
uses: actions/upload-pages-artifact@v0
30+
with:
31+
path: ./_site
32+
33+
deploy:
34+
runs-on: ubuntu-latest
35+
needs: build
36+
37+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
38+
permissions:
39+
pages: write # to deploy to Pages
40+
id-token: write # to verify the deployment originates from an appropriate source
41+
42+
# Deploy to the github-pages environment
43+
environment:
44+
name: github-pages
45+
url: ${{ steps.deployment.outputs.page_url }}
46+
47+
steps:
48+
- name: Deploy
49+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
50+
uses: actions/deploy-pages@v1

.ruby-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.1.2

docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ services:
99
- 4000:4000
1010
- 35729:35729
1111
volumes:
12-
- ./:/srv/jekyll
12+
- ./:/srv/jekyll

0 commit comments

Comments
 (0)