From 7499f308a6dabcea0a1f936c8d4284a0bb2036f4 Mon Sep 17 00:00:00 2001 From: SirStendec Date: Thu, 24 Oct 2024 13:35:58 -0400 Subject: [PATCH] * Maintenance: Add workflow to automate builds of the main client for the user-script version of FFZ. --- .github/workflows/build.yml | 67 +++++++++++++++++++++++++++++++++++++ README.md | 21 ++++++++---- 2 files changed, 81 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..8b66d8cb --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,67 @@ +name: Build Main Client + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Uses PNPM + uses: pnpm/action-setup@v4 + with: + version: 8 + run_install: false + + - name: Uses Node.js 18.x + uses: actions/setup-node@v4 + with: + node-version: 18 + cache: 'pnpm' + + - name: Install Dependencies + run: pnpm install + + - name: Build the Client + run: pnpm build + + - name: Create Archive + id: artifact-upload-setp + uses: actions/upload-artifact@v4 + with: + name: client + path: | + dist + + - name: Deploy (Clean) + uses: garygrossgarten/github-action-ssh@release + with: + command: $HOME/clean-client.sh + host: ${{ secrets.HOST }} + username: ${{ secrets.SSH_USERNAME }} + passphrase: ${{ secrets.SSH_PASSPHRASE }} + privateKey: ${{ secrets.SSH_PRIVATE_KEY }} + + - name: Deploy (Copy) + uses: appleboy/scp-action@v0.1.7 + with: + source: dist + target: client + strip_components: 1 + host: ${{ secrets.HOST }} + username: ${{ secrets.SSH_USERNAME }} + key: ${{ secrets.SSH_PRIVATE_KEY }} + + - name: Deploy (Execute) + uses: garygrossgarten/github-action-ssh@release + with: + command: $HOME/update-client.sh + host: ${{ secrets.HOST }} + username: ${{ secrets.SSH_USERNAME }} + passphrase: ${{ secrets.SSH_PASSPHRASE }} + privateKey: ${{ secrets.SSH_PRIVATE_KEY }} diff --git a/README.md b/README.md index a3d4e757..ae8bb18e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,10 @@ FrankerFaceZ ============ -Copyright (c) 2018 Dan Salvato LLC +[![Build Main Client](https://github.com/FrankerFaceZ/FrankerFaceZ/actions/workflows/build.yml/badge.svg)](https://github.com/FrankerFaceZ/FrankerFaceZ/actions/workflows/build.yml) +[![Build Extension](https://github.com/FrankerFaceZ/Extension/actions/workflows/build-extension.yml/badge.svg)](https://github.com/FrankerFaceZ/Extension/actions/workflows/build-extension.yml) + +Copyright (c) 2024 Dan Salvato LLC Licensed under the Apache License, Version 2.0. See LICENSE. @@ -29,13 +32,17 @@ when a local copy of a file isn't present. > which self-signs a certificate for hosting content via HTTPS. You will need > to ensure your browser accepts a self-signed certificate for localhost. -To make FrankerFaceZ load from your local development server, you must set -the local storage variable `ffzDebugMode` to true. Just run the following -in your console on Twitch: `localStorage.ffzDebugMode = true;` +The user-script version of FrankerFaceZ is designed to make it easy to load +from your local development server. Please switch to using the user-script +version for development purposes. -It should be noted that this project is not a browser extension that you -would load in your browser's extensions system. You still need the FrankerFaceZ -extension or user-script for your browser. +Then, you must set the local storage variable `ffzDebugMode` to true. +Just run the following in your console on Twitch: +```javascript +localStorage.ffzDebugMode = true; +``` + +--- You can edit the project's icon font using the `pnpm font` command. This will create a new Fontello session, if one doesn't already exist, and open your