Skip to content

updated styling

updated styling #174

Workflow file for this run

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
prepare:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Add front matter to markdown files (for Jekyll to notice)
run: |
for f in $(find . -type f -name "*.md" ! -name "README.md"); do
if ! grep -q "^---$" "$f"; then
folderName=$(basename $(dirname $f))
siteTitle=$(awk 'NR==1{print substr($0, 3)}' "$f")
sed -i '1s/^/---\n/' $f
sed -i '2s/^/toc: true\n/' $f
sed -i '3s/^/layout: dark\n/' $f
sed -i "4s/^/title: $siteTitle \n/" $f
sed -i "5s/^/category: $folderName \n/" $f
sed -i '6s/^/---\n/' $f
fi
done
- name: Commit changes
run: |
git config --global user.email "protitom@gmail.com"
git config --global user.name "tpkowastaken"
git add .
git commit -m "Build Jekyll site" --allow-empty
git push https://${{ secrets.TOKEN }}@github.com/tpkowastaken/test-jekyll.github.io.git HEAD:main
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set Permissions
run: |
sudo chown -R $USER .
sudo chmod -R 777 .
- name: Build with Jekyll
uses: docker://jekyll/builder:latest
with:
entrypoint: jekyll
args: build --config _config.yml --source ./ --destination ./_site --incremental
- name: Upload artifact to view
uses: actions/upload-artifact@v2
with:
name: site
path: _site
- name: Upload artifact for github pages
# Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v1
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2