Skip to content

switch to one font style #430

switch to one font style

switch to one font style #430

Workflow file for this run

name: critical CSS
on:
push:
branches:
- master
jobs:
crittr:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0
- name: setup git config
run: |
git config --local user.name ${{ secrets.USERNAME_GITHUB }}
git config --local user.email ${{ secrets.EMAIL }}
echo "Git Setup Status:"
git status
# echo "SSL Key setup info"
# ssh -vT git@github.com
echo "Git Setup Remotes:"
git remote -v
echo "Git Pull:"
git pull --ff-only origin ${{ github.ref_name }}
- name: setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Clean install dependencies
run: |
sudo apt-get update && sudo apt-get install -y libvips-tools
- name: cache gems
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: ${{ runner.os }}-gems-
- name: get repo
run: |
git clone https://github.com/datapolitical/chrisfnicholson
cd chrisfnicholson
echo "reached config"
bundle config set local.contrast-theme $GITHUB_WORKSPACE
working-directory: /home/runner/work/contrast-theme
- name: bundle install
run: |
pwd
bundle config disable_local_branch_check true
bundle install --path=vendor/bundle --jobs 4 --retry 3 --verbose
convert --version
working-directory: /home/runner/work/contrast-theme/chrisfnicholson
- name: jekyll build
run: |
pwd
bundle exec jekyll build --destination gh-pages --config _config.yml
working-directory: /home/runner/work/contrast-theme/chrisfnicholson
- uses: actions/setup-node@v3
with:
node-version: 18
- name: get css
run: |
npm i crittr
npm i inline-csp-hash
ls -a
cat contrast_theme_node.js
node contrast_theme_node.js ${{ github.ref_name }}
# echo "body {display: flex;}" > 'critical.scss'
echo "Raw generated File"
cat critical.scss
git pull --ff-only origin main
working-directory: /home/runner/work/contrast-theme/chrisfnicholson
- name: amend and commit
run: |
cp chrisfnicholson/critical.scss contrast-theme/_includes/critical.scss
cd contrast-theme
echo "Committed Generated File"
git add _includes/critical.scss
git diff --staged
git commit -m "Update critical css" || echo "::set-output name=status::Nothing to update"
working-directory: /home/runner/work/contrast-theme
- name: push
run: |
git push "https://${{github.actor}}:${{github.token}}@github.com/${{github.repository}}.git" "HEAD:${{github.ref_name}}"
working-directory: /home/runner/work/contrast-theme/contrast-theme
- name: build site
if: (contains(github.event.commits[0].message, '[no-build]') || github.ref_name != 'master' ) == false
run: |
curl -X POST "${{ secrets.CLOUDFLARE_DEPLOY }}"