Trying to improve jekyll build performance
This commit is contained in:
parent
a3e7e9ce78
commit
7d8aad1bcf
@ -24,11 +24,13 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: checkout pages
|
- name: checkout pages
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: 'pages'
|
ref: 'pages'
|
||||||
path: 'pages'
|
path: 'pages'
|
||||||
|
|
||||||
- name: Cleanup Pages Branch
|
- name: Cleanup Pages Branch
|
||||||
run: |
|
run: |
|
||||||
cd pages
|
cd pages
|
||||||
@ -37,21 +39,47 @@ jobs:
|
|||||||
git rm --cached -r update_cloudflare_dns.py domains.yaml || true
|
git rm --cached -r update_cloudflare_dns.py domains.yaml || true
|
||||||
git commit -m "Remove ignored files from Jekyll site"
|
git commit -m "Remove ignored files from Jekyll site"
|
||||||
cd ..
|
cd ..
|
||||||
- name: Setup Ruby
|
|
||||||
|
- name: Install Ruby
|
||||||
|
run: |
|
||||||
|
apt-get update && \
|
||||||
|
apt-get install curl wget tar build-essential zlib1g-dev -y && \
|
||||||
|
wget -O ruby.tar.bz2 https://raw.morlana.space/morlana/rvm-binaries/@binaries/ubuntu/22.04/aarch64/ruby-$RUBY_VERSION.tar.bz2 && \
|
||||||
|
tar -xjf ruby.tar.bz2 -C /usr/local && \
|
||||||
|
rm ruby.tar.bz2 && \
|
||||||
|
ln -s /usr/local/ruby-$RUBY_VERSION/bin/ruby /usr/local/bin/ruby && \
|
||||||
|
ln -s /usr/local/ruby-$RUBY_VERSION/bin/gem /usr/local/bin/gem
|
||||||
|
|
||||||
|
- name: Cache Gems
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.gem
|
||||||
|
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-gems-
|
||||||
|
|
||||||
|
- name: Install Bundler and Jekyll
|
||||||
run: |
|
run: |
|
||||||
apt-get update
|
|
||||||
apt-get install curl wget tar build-essential zlib1g-dev gpg -y
|
|
||||||
curl -sSL https://rvm.io/mpapis.asc | gpg --import -
|
|
||||||
curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
|
|
||||||
curl -sSL https://get.rvm.io | bash -s stable
|
|
||||||
source /etc/profile.d/rvm.sh
|
|
||||||
rvm mount -r https://raw.morlana.space/morlana/rvm-binaries/@binaries/ubuntu/22.04/aarch64/ruby-$RUBY_VERSION.tar.bz2
|
|
||||||
rvm use $RUBY_VERSION && ruby -v && gem -v
|
|
||||||
gem install bundler jekyll webrick
|
gem install bundler jekyll webrick
|
||||||
|
bundle install
|
||||||
|
|
||||||
|
#- name: Setup Ruby
|
||||||
|
# run: |
|
||||||
|
# apt-get update
|
||||||
|
# apt-get install curl wget tar build-essential zlib1g-dev gpg -y
|
||||||
|
# curl -sSL https://rvm.io/mpapis.asc | gpg --import -
|
||||||
|
# curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
|
||||||
|
# curl -sSL https://get.rvm.io | bash -s stable
|
||||||
|
# source /etc/profile.d/rvm.sh
|
||||||
|
# rvm mount -r https://raw.morlana.space/morlana/rvm-binaries/@binaries/ubuntu/22.04/aarch64/ruby-$RUBY_VERSION.tar.bz2
|
||||||
|
# rvm use $RUBY_VERSION && ruby -v && gem -v
|
||||||
|
# gem install bundler jekyll webrick
|
||||||
|
|
||||||
- name: Prepare Jekyll Index
|
- name: Prepare Jekyll Index
|
||||||
run: |
|
run: |
|
||||||
echo "---\nlayout: default\ntitle: Documentation\n---\n" > index.md
|
echo "---\nlayout: default\ntitle: Documentation\n---\n\n" > index.md
|
||||||
cat README.md >> index.md
|
cat README.md >> index.md
|
||||||
|
|
||||||
- name: Build with Jekyll
|
- name: Build with Jekyll
|
||||||
run: |
|
run: |
|
||||||
source /etc/profile.d/rvm.sh
|
source /etc/profile.d/rvm.sh
|
||||||
@ -60,6 +88,7 @@ jobs:
|
|||||||
bundle exec jekyll build --destination pages
|
bundle exec jekyll build --destination pages
|
||||||
env:
|
env:
|
||||||
JEKYLL_ENV: production
|
JEKYLL_ENV: production
|
||||||
|
|
||||||
- name: push pages
|
- name: push pages
|
||||||
run: |
|
run: |
|
||||||
cd pages
|
cd pages
|
||||||
|
Reference in New Issue
Block a user