From f04a33378c5488a854bec910a4373b0c6b405fb2 Mon Sep 17 00:00:00 2001 From: Herwin Bozet Date: Tue, 26 Nov 2024 21:39:56 +0100 Subject: [PATCH] Testing PHP Rendering workflow Update php-render.yml, sass-compile.yml, and nibblepoker.scss --- .github/workflows/php-render.yml | 49 ++++++++++++++++++++++++++++++ .github/workflows/sass-compile.yml | 2 +- scss/nibblepoker.scss | 6 ++-- 3 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/php-render.yml diff --git a/.github/workflows/php-render.yml b/.github/workflows/php-render.yml new file mode 100644 index 0000000..1feb459 --- /dev/null +++ b/.github/workflows/php-render.yml @@ -0,0 +1,49 @@ +name: Render PHP Demo Page + +on: + push: + pull_request: + +jobs: + prerender: + runs-on: ubuntu-latest + + steps: + - name: Checkout Git submodules + uses: actions/checkout@v4 + with: + submodules: true + fetch-depth: 0 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 'latest' + + - name: Install HTML Beautifier + run: | + npm install -g beautify -g + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.4' + extensions: none + + - name: Pre-render PHP File + run: | + php ./htdocs/index.php > ./htdocs/index.raw.html + + - name: Beautify HTML + run: | + beautify -o ./htdocs/index.raw.html ./htdocs/index.html + + - name: Upload `index.html` build artifact + uses: actions/upload-artifact@v4 + if: ${{ github.actor == 'aziascreations' }} + with: + name: index.html + path: "./htdocs/index.html" + if-no-files-found: error + retention-days: 90 + compression-level: 9 diff --git a/.github/workflows/sass-compile.yml b/.github/workflows/sass-compile.yml index df8d759..91d1868 100644 --- a/.github/workflows/sass-compile.yml +++ b/.github/workflows/sass-compile.yml @@ -28,7 +28,7 @@ jobs: - name: Install SASS Compiler run: | - npm install -g html-minifier sass + npm install -g sass - name: Compile SASS run: | diff --git a/scss/nibblepoker.scss b/scss/nibblepoker.scss index 84191ee..d75fa14 100644 --- a/scss/nibblepoker.scss +++ b/scss/nibblepoker.scss @@ -2,9 +2,11 @@ * ----------------------------------------------------------------------------- * NibblePoker CSS Theme * ----------------------------------------------------------------------------- - * Author: Herwin Bozet + * Author: Herwin Bozet (@NibblePoker) * License: CC0 1.0 (Public Domain) - * Source: ??? + * Sources: + * - https://github.com/aziascreations/CSS-NibblePoker/ + * - https://git.nibblepoker.lu/aziascreations/CSS-NibblePoker * ----------------------------------------------------------------------------- */