From 5f7e048126070959d0412ecdb7c5f2bdd876bc0e Mon Sep 17 00:00:00 2001 From: Teddy van Jerry Date: Fri, 16 Aug 2024 14:15:05 +0800 Subject: [PATCH] Update GH Action to Build Page --- .github/workflows/static.yml | 7 ++----- .gitignore | 3 +++ build.sh | 7 +++++++ 3 files changed, 12 insertions(+), 5 deletions(-) create mode 100755 build.sh diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 4b075b8..52086f0 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -39,15 +39,12 @@ jobs: - name: Install Pip dependencies run: pip install -r requirements.txt - name: Build static page - run: python ./generate.py + run: ./build.sh - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: # Upload entire repository - path: | - './lists' - './index.html' - './style.css' + path: './build' - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 diff --git a/.gitignore b/.gitignore index faf5297..3bc2333 100644 --- a/.gitignore +++ b/.gitignore @@ -163,3 +163,6 @@ cython_debug/ # Generated Index Page index.html + +# GH Pages +/build diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..a54897e --- /dev/null +++ b/build.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +python ./generate.py +mkdir -p build +cp -r ./lists ./build +cp index.html ./build +cp style.css ./build