forked 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.
format code with prettier.io (alshedivat#2048)
summary: - adds prettier formatter configuration - formats the entire repo using prettier, ignoring minified files (`*.min.css`) and heavy generated html - changes extensions of all `.html` files to `.liquid`, which is more correct and necessary for prettier to work correctly - replaces "%-" and "-%" with just "%" — manual liquid formatting using minus signs is superfluous since we are compressing and minifying the code anyway - adds CI action for running prettier check on PR and pushes to master
- Loading branch information
1 parent
bb9f564
commit bd009a0
Showing
202 changed files
with
37,749 additions
and
23,170 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,31 +14,30 @@ jobs: | |
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v3 | ||
- name: Setup Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.2.2' | ||
bundler-cache: true | ||
- name: Update _config.yml ⚙️ | ||
uses: fjogeleit/[email protected] | ||
with: | ||
commitChange: false | ||
valueFile: '_config.yml' | ||
propertyPath: 'giscus.repo' | ||
value: ${{ github.repository }} | ||
- name: Install and Build 🔧 | ||
run: | | ||
pip3 install --upgrade jupyter | ||
npm install -g mermaid.cli | ||
npm install -g purgecss | ||
export JEKYLL_ENV=production | ||
bundle exec jekyll build --lsi | ||
purgecss -c purgecss.config.js | ||
- name: Deploy 🚀 | ||
if: github.event_name != 'pull_request' | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
folder: _site | ||
|
||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v3 | ||
- name: Setup Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: "3.2.2" | ||
bundler-cache: true | ||
- name: Update _config.yml ⚙️ | ||
uses: fjogeleit/[email protected] | ||
with: | ||
commitChange: false | ||
valueFile: "_config.yml" | ||
propertyPath: "giscus.repo" | ||
value: ${{ github.repository }} | ||
- name: Install and Build 🔧 | ||
run: | | ||
pip3 install --upgrade jupyter | ||
npm install -g mermaid.cli | ||
npm install -g purgecss | ||
export JEKYLL_ENV=production | ||
bundle exec jekyll build --lsi | ||
purgecss -c purgecss.config.js | ||
- name: Deploy 🚀 | ||
if: github.event_name != 'pull_request' | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
folder: _site |
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 |
---|---|---|
|
@@ -7,12 +7,12 @@ on: | |
types: | ||
- completed | ||
|
||
# on: | ||
# on: | ||
# push: | ||
# branches: | ||
# branches: | ||
# - 'master' | ||
|
||
jobs: | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
if: github.repository_owner == 'alshedivat' | ||
|
@@ -22,30 +22,30 @@ jobs: | |
working-directory: ${{ github.workspace }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Login | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: update docker-compose | ||
shell: bash | ||
run: | | ||
sed -i "s|\.:|${{ github.workspace }}:|g" ${{ github.workspace }}/docker-compose.yml | ||
cat ${{ github.workspace }}/docker-compose.yml | ||
- uses: kitabisa/[email protected] | ||
env: | ||
DSLIM_PULL: true | ||
DSLIM_COMPOSE_FILE: ${{ github.workspace }}/docker-compose.yml | ||
DSLIM_TARGET_COMPOSE_SVC: jekyll | ||
DSLIM_CONTINUE_AFTER: signal | ||
with: | ||
target: amirpourmand/al-folio | ||
tag: "slim" | ||
|
||
# Push to the registry | ||
- run: docker image push amirpourmand/al-folio:slim | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Login | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: update docker-compose | ||
shell: bash | ||
run: | | ||
sed -i "s|\.:|${{ github.workspace }}:|g" ${{ github.workspace }}/docker-compose.yml | ||
cat ${{ github.workspace }}/docker-compose.yml | ||
- uses: kitabisa/[email protected] | ||
env: | ||
DSLIM_PULL: true | ||
DSLIM_COMPOSE_FILE: ${{ github.workspace }}/docker-compose.yml | ||
DSLIM_TARGET_COMPOSE_SVC: jekyll | ||
DSLIM_CONTINUE_AFTER: signal | ||
with: | ||
target: amirpourmand/al-folio | ||
tag: "slim" | ||
|
||
# Push to the registry | ||
- run: docker image push amirpourmand/al-folio:slim |
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,26 @@ | ||
name: prettier | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
branches: | ||
- master | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
check: | ||
# available images: https://github.com/actions/runner-images#available-images | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v3 | ||
- name: Setup Node.js ⚙️ | ||
uses: actions/setup-node@v4 | ||
- name: Install Prettier 💾 | ||
run: npm install --save-dev --save-exact prettier @shopify/prettier-plugin-liquid | ||
- name: Prettier Check 🔎 | ||
run: npx prettier . --check |
Oops, something went wrong.