-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #760 from alexwlchan/run-in-macos-jekyll
Allow running in macOS Ruby rather than Docker
- Loading branch information
Showing
48 changed files
with
950 additions
and
1,032 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,28 @@ jobs: | |
- name: "Check out the repo" | ||
uses: actions/checkout@v4 | ||
|
||
- name: "Set up Ruby" | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: "3.3" | ||
bundler-cache: true | ||
cache-version: 1 | ||
|
||
# Not all the gems get installed properly for some reason, and | ||
# I get errors like: | ||
# | ||
# `require': cannot load such file -- json-schema (LoadError) | ||
# | ||
# Try installing them manually instead. | ||
- run: gem install html-proofer json-schema nokogiri | ||
|
||
- name: "Set up Python" | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
cache: "pip" | ||
- run: pip install -r requirements.txt | ||
|
||
- name: "Cache site output" | ||
uses: "actions/cache@v4" | ||
with: | ||
|
@@ -50,10 +72,10 @@ jobs: | |
restore-keys: "jekyll-cache-" | ||
|
||
- name: "Build the site" | ||
run: make html-drafts | ||
run: bundle exec jekyll build --drafts | ||
|
||
- name: "Run linting" | ||
run: make lint | ||
run: ruby scripts/linter.rb | ||
|
||
- name: "Publish drafts" | ||
if: github.ref == 'refs/heads/main' | ||
|
@@ -67,17 +89,25 @@ jobs: | |
git config --global --add safe.directory /home/runner/work/alexwlchan.net/alexwlchan.net | ||
make publish-drafts | ||
make html | ||
ruby scripts/publish_drafts.rb | ||
bundle exec jekyll build | ||
else | ||
echo "There is no _drafts folder, so nothing to publish!" | ||
fi | ||
- name: "Deploy to Netlify" | ||
if: github.ref == 'refs/heads/main' | ||
run: make deploy-prod | ||
- name: Deploy to Netlify | ||
uses: nwtgck/[email protected] | ||
with: | ||
publish-dir: "_site" | ||
production-branch: main | ||
github-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | ||
deploy-message: "Deploy from GitHub Actions" | ||
enable-pull-request-comment: true | ||
overwrites-pull-request-comment: true | ||
env: | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
NETLIFY_SITE_ID: "da37a488-4df9-4cc2-b267-947179af20bd" | ||
timeout-minutes: 1 | ||
|
||
- name: "Push any commits to GitHub" | ||
if: github.ref == 'refs/heads/main' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,5 @@ | |
.jekyll-metadata | ||
.sass-cache | ||
_site | ||
.missing_images.json | ||
.header_colours.txt | ||
|
||
.DS_Store |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
a5376e2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://alexwlchan.net as production
🚀 Deployed on https://6612e6bfbdfc6fec19ba021d--alexwlchan.netlify.app