diff --git a/.github/workflows/build-site.yml b/.github/workflows/build-site.yml index 2edeb61..c5bbe69 100644 --- a/.github/workflows/build-site.yml +++ b/.github/workflows/build-site.yml @@ -3,11 +3,11 @@ name: Build Site on: push: branches: - - main + - master # Or your main branch, e.g., main jobs: build: runs-on: ubuntu-latest - if: github.actor != 'github-actions[bot]' && github.ref == 'refs/heads/main' + if: github.actor != 'github-actions[bot]' && github.ref == 'refs/heads/master' # Or your main branch permissions: contents: write steps: @@ -26,8 +26,8 @@ jobs: run: | git config --local user.email "github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" - # Add all HTML files in the root directory - git add -- '*.html' + # Add all HTML files in the website directory + git add -- 'website/*.html' # Only commit if there are staged changes git diff --staged --quiet || git commit -m "Automated build: Update generated site files" git push diff --git a/build.js b/build.js index 172d64a..9c70e4e 100644 --- a/build.js +++ b/build.js @@ -18,9 +18,13 @@ async function buildPage(pageName, outputName) { const commonHeaderPath = path.join(__dirname, 'templates', '_header.html'); const commonFooterPath = path.join(__dirname, 'templates', '_footer.html'); const contentPath = path.join(__dirname, 'src', `${pageName}.html`); - const outputPath = path.join(__dirname, `${outputName}.html`); + const outputDir = path.join(__dirname, 'website'); + const outputPath = path.join(outputDir, `${outputName}.html`); try { + // Ensure the website directory exists + await fs.mkdir(outputDir, { recursive: true }); + let layoutContent = await fs.readFile(layoutPath, 'utf-8'); const srcFileContent = await fs.readFile(contentPath, 'utf-8'); @@ -100,7 +104,7 @@ async function buildPage(pageName, outputName) { console.log(`Successfully built ${outputPath}`); } catch (error) { console.error(`Error building page ${pageName}:`, error); - throw error; + throw error; // Re-throw to fail the build process if needed } } diff --git a/index.html b/index.html deleted file mode 100644 index 07c91c9..0000000 --- a/index.html +++ /dev/null @@ -1,81 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -I respect your privacy.
- -My apps do not collect, store, or share any personal information. No analytics, no tracking, no funny business.
- -This site may collect anonymous usage data (such as page views or general browser information) to help improve functionality and performance. This data is non-personal and cannot be used to identify you. I do not sell or share this data with third parties.
-Additionally, this site uses Cloudflare for performance and security. Cloudflare may collect its own analytics and statistical data, subject to their privacy policy.
- -By using this site, you agree to this policy.
-