Skip to content

Commit

Permalink
Customise fontcustom config to define version
Browse files Browse the repository at this point in the history
  • Loading branch information
lucjaulmes committed Nov 10, 2023
1 parent dd4dc37 commit aef0566
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/build_fonts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ jobs:
commit_author: ${{ steps.describe.outputs.author }}
commit_subject: ${{ steps.describe.outputs.subject }}
commit_body: ${{ steps.describe.outputs.body }}
version: ${{ steps.describe.outputs.version }}

steps:
- name: Get sources
uses: actions/checkout@v1
uses: actions/checkout@v4

- name: Describe commit
id: describe
Expand All @@ -42,6 +43,8 @@ jobs:
echo "body<<EOF" | tee -a ${GITHUB_OUTPUT}
git log -n1 --pretty=format:'%b' | tee -a ${GITHUB_OUTPUT}
echo "EOF" | tee -a ${GITHUB_OUTPUT}
# Arbitrary mechanism for defining the version
echo "version=`yq -r .version config/fontcustom.yml`" | tee -a ${GITHUB_OUTPUT}
- uses: ruby/setup-ruby@v1
id: ruby
Expand Down Expand Up @@ -110,7 +113,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Get sources
uses: actions/checkout@v1
uses: actions/checkout@v4
with:
ref: master
fetch-depth: 0
Expand Down Expand Up @@ -201,6 +204,10 @@ jobs:
- name: Deploy to public branch
if: ${{ github.ref == 'refs/heads/sources' || steps.events.inputs.force != 'no' }}
run: |
# Ensure version metadata is in sync
jq '.version="${{ needs.build.outputs.version }}"' package.json > update && mv update package.json
yq -i '.version="${{ needs.build.outputs.version }}"' docs/_config.yml
# Add modified files and new files in selected subdirectories
git add -u
git add fonts/ css/ docs/
Expand Down
5 changes: 1 addition & 4 deletions config/academicons.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
/*
* <%= font_name %> 1.9.1 by James Walsh (https://github.com/jpswalsh) and Katja Bercic (https://github.com/katjabercic)
* Fonts generated using FontCustom - https://github.com/FontCustom/fontcustom
* Square icons designed to be used alongside Font Awesome square icons - https://fortawesome.github.io/Font-Awesome/
* Licenses - Font: SIL OFL 1.1, CSS: MIT License
* <%= copyright %>
*/

<%= font_face %>
Expand Down
10 changes: 9 additions & 1 deletion config/fontcustom.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
font_name: academicons
version: 1.9.3
css_selector: .ai-{{glyph}}
preprocessor_path: ""
autowidth: true
Expand All @@ -7,7 +8,14 @@ force: false
debug: false
quiet: false

copyright: The Academicons font is licensed under the SIL OFL 1.1 (http://scripts.sil.org/OFL), Academicons CSS, LESS, and SASS files are licensed under the MIT License (http://opensource.org/licenses/mit-license.html), The Academicons documentation is licensed under the CC BY 3.0 License (http://creativecommons.org/licenses/by/3.0/)
copyright: |
Academicons 1.9.3 by James Walsh (https://github.com/jpswalsh) and Katja Bercic (https://github.com/katjabercic)
The Academicons font is licensed under the SIL OFL 1.1 (http://scripts.sil.org/OFL).
Academicons CSS, LESS, and SASS files are licensed under the MIT License (http://opensource.org/licenses/mit-license.html).
The Academicons documentation is licensed under the CC BY 3.0 License (http://creativecommons.org/licenses/by/3.0/)
Square icons designed to be used alongside Font Awesome square icons
font_design_size: 16
font_em: 512
Expand Down

0 comments on commit aef0566

Please sign in to comment.