generated from alshedivat/al-folio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Include updates and fixes from (alshedivat/al-folio#2613) to (alshedivat/al-folio#2826) - Update till commit c5d484e on Dec 3, 2024
- Loading branch information
1 parent
97c58d2
commit 0e054fc
Showing
56 changed files
with
23,116 additions
and
42,123 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
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
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Prettify gh-pages | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout gh-pages branch | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: gh-pages | ||
|
||
- name: Find and Remove </source> Tags | ||
run: find . -type f -name "*.html" -exec sed -i 's/<\/source>//g' {} + | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
|
||
- name: Install Prettier | ||
run: npm install -g prettier | ||
|
||
- name: Check for Prettier | ||
run: npx prettier --version || echo "Prettier not found" | ||
|
||
- name: Run Prettier on HTML files | ||
run: npx prettier --write '**/*.html' | ||
|
||
- name: Commit and push changes | ||
run: | | ||
git config user.name "github-actions" | ||
git config user.email "actions@github.com" | ||
git add . | ||
git commit -m "Formatted HTML files" || echo "No changes to commit" | ||
git push |
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Publish posts scheduled for today | ||
|
||
on: | ||
schedule: | ||
# Run every day at 23:30 UTC or manually run | ||
- cron: "30 23 * * *" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish_scheduled: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout main branch | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: main | ||
|
||
- name: Get the date for today | ||
id: date | ||
run: echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | ||
|
||
- name: Check for scheduled posts and move to posts | ||
run: | | ||
echo "Today is $TODAY" | ||
shopt -s nullglob | ||
for file in _scheduled/${TODAY}-*.md; do | ||
echo "Found scheduled: $file" | ||
mv "$file" "_posts/" | ||
echo "Moved $file to _posts/" | ||
done | ||
- name: Commit and push changes | ||
run: | | ||
git config user.name "github-actions" | ||
git config user.email "actions@github.com" | ||
git add _posts/ | ||
git add _scheduled/ | ||
git commit -m "Posted Scheduled Drafts on $TODAY" || echo "No changes to commit" | ||
git push |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
linkedin.com | ||
reddit.com | ||
jpa.gov.my |
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 |
---|---|---|
@@ -1,41 +1,75 @@ | ||
FROM ruby:latest | ||
|
||
# uncomment these if you are having this issue with the build: | ||
# /usr/local/bundle/gems/jekyll-4.3.4/lib/jekyll/site.rb:509:in `initialize': Permission denied @ rb_sysopen - /srv/jekyll/.jekyll-cache/.gitignore (Errno::EACCES) | ||
# ARG GROUPID=901 | ||
# ARG GROUPNAME=ruby | ||
# ARG USERID=901 | ||
# ARG USERNAME=jekyll | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
Label MAINTAINER Amir Pourmand | ||
LABEL authors="Amir Pourmand,George Araújo" \ | ||
description="Docker image for al-folio academic template" \ | ||
maintainer="Amir Pourmand" | ||
|
||
RUN apt-get update -y && apt-get install -y --no-install-recommends \ | ||
locales \ | ||
imagemagick \ | ||
build-essential \ | ||
zlib1g-dev \ | ||
jupyter-nbconvert \ | ||
inotify-tools procps && \ | ||
apt-get clean && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* | ||
# uncomment these if you are having this issue with the build: | ||
# /usr/local/bundle/gems/jekyll-4.3.4/lib/jekyll/site.rb:509:in `initialize': Permission denied @ rb_sysopen - /srv/jekyll/.jekyll-cache/.gitignore (Errno::EACCES) | ||
# add a non-root user to the image with a specific group and user id to avoid permission issues | ||
# RUN groupadd -r $GROUPNAME -g $GROUPID && \ | ||
# useradd -u $USERID -m -g $GROUPNAME $USERNAME | ||
|
||
# install system dependencies | ||
RUN apt-get update -y && \ | ||
apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
curl \ | ||
imagemagick \ | ||
inotify-tools \ | ||
locales \ | ||
nodejs \ | ||
procps \ | ||
python3-pip \ | ||
zlib1g-dev && \ | ||
pip --no-cache-dir install --upgrade --break-system-packages nbconvert | ||
|
||
# clean up | ||
RUN apt-get clean && \ | ||
apt-get autoremove && \ | ||
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* /tmp/* | ||
|
||
# set the locale | ||
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \ | ||
locale-gen | ||
|
||
|
||
ENV LANG=en_US.UTF-8 \ | ||
# set environment variables | ||
ENV EXECJS_RUNTIME=Node \ | ||
JEKYLL_ENV=production \ | ||
LANG=en_US.UTF-8 \ | ||
LANGUAGE=en_US:en \ | ||
LC_ALL=en_US.UTF-8 \ | ||
JEKYLL_ENV=production | ||
LC_ALL=en_US.UTF-8 | ||
|
||
# create a directory for the jekyll site | ||
RUN mkdir /srv/jekyll | ||
|
||
# copy the Gemfile and Gemfile.lock to the image | ||
ADD Gemfile.lock /srv/jekyll | ||
ADD Gemfile /srv/jekyll | ||
|
||
# set the working directory | ||
WORKDIR /srv/jekyll | ||
|
||
# install jekyll and dependencies | ||
RUN gem install jekyll bundler | ||
|
||
RUN gem install --no-document jekyll bundler | ||
RUN bundle install --no-cache | ||
# && rm -rf /var/lib/gems/3.1.0/cache | ||
|
||
EXPOSE 8080 | ||
|
||
COPY bin/entry_point.sh /tmp/entry_point.sh | ||
|
||
# uncomment this if you are having this issue with the build: | ||
# /usr/local/bundle/gems/jekyll-4.3.4/lib/jekyll/site.rb:509:in `initialize': Permission denied @ rb_sysopen - /srv/jekyll/.jekyll-cache/.gitignore (Errno::EACCES) | ||
# set the ownership of the jekyll site directory to the non-root user | ||
# USER $USERNAME | ||
|
||
CMD ["/tmp/entry_point.sh"] |
Oops, something went wrong.