Skip to content

Build SerenityOS-Emoji.ttf #604

Build SerenityOS-Emoji.ttf

Build SerenityOS-Emoji.ttf #604

Workflow file for this run

name: Build SerenityOS-Emoji.ttf
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
permissions:
contents: read
pages: write
id-token: write
env:
SERENITY_SOURCE_DIR: ${{ github.workspace }}/serenity
jobs:
build_serenityos_emoji_ttf:
runs-on: ubuntu-latest
steps:
- name: Checkout self
uses: actions/checkout@v3
- name: Checkout SerenityOS
uses: actions/checkout@v3
with:
repository: SerenityOS/serenity
path: serenity
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
pip3 install -r requirements.txt
- name: Download and patch pixart2svg
run: |
wget https://gist.githubusercontent.com/m13253/66284bc244deeff0f0f8863c206421c7/raw/f9454958dc0a33cea787cc6fbd7e8e34ba6eb23b/pixart2svg.py
for file in patches/*.patch; do
patch -p0 < "$file"
done
- name: Build SerenityOS-Emoji.ttf
run: |
python main.py
- name: Prepare files for artifacts upload
if: ${{ github.repository == 'linusg/serenityos-emoji-font' && github.ref == 'refs/heads/main' }}
run: |
cp LICENSE build/
cp SerenityOS-Emoji.css build/
mkdir pages
cp build/SerenityOS-Emoji.ttf pages
cp build/index.html pages
cp build/SerenityOS-Emoji.css pages
- name: Upload artifacts
if: ${{ github.repository == 'linusg/serenityos-emoji-font' && github.ref == 'refs/heads/main' }}
uses: actions/upload-artifact@v3
with:
name: SerenityOS-Emoji.ttf
# Flatten file structure in created .zip by copying LICENSE and SerenityOS-Emoji.css to build/ and taking them from there
path: |
build/LICENSE
build/SerenityOS-Emoji.css
build/SerenityOS-Emoji.ttf
build/index.html
retention-days: 7
- name: Upload artifacts for GitHub Pages
if: ${{ github.repository == 'linusg/serenityos-emoji-font' && github.ref == 'refs/heads/main' }}
uses: actions/upload-pages-artifact@v1
with:
path: 'pages'
deploy_to_github_pages:
if: ${{ github.repository == 'linusg/serenityos-emoji-font' && github.ref == 'refs/heads/main' }}
needs: build_serenityos_emoji_ttf
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1