From d0cc214dace2426e1d71a5c364579374b702410a Mon Sep 17 00:00:00 2001
From: Ella <4710635+ellatrix@users.noreply.github.com>
Date: Fri, 7 Jun 2024 08:44:49 +0300
Subject: [PATCH] Deploy web action (#9)

---
 .github/workflows/deloy-web.yml  | 23 +++++++++++++++++++++++
 docs/privacy-policy.md           |  5 -----
 public/privacy-policy/index.html |  8 ++++++++
 src/index.html                   |  2 +-
 4 files changed, 32 insertions(+), 6 deletions(-)
 create mode 100644 .github/workflows/deloy-web.yml
 delete mode 100644 docs/privacy-policy.md
 create mode 100644 public/privacy-policy/index.html

diff --git a/.github/workflows/deloy-web.yml b/.github/workflows/deloy-web.yml
new file mode 100644
index 0000000..4b7acc1
--- /dev/null
+++ b/.github/workflows/deloy-web.yml
@@ -0,0 +1,23 @@
+name: Build and Deploy to GitHub Pages
+on:
+  push:
+    branches:
+    - main
+    - deploy-web
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v4
+    - uses: actions/setup-node@v4
+      with:
+        node-version: lts/*
+    - name: Install dependencies
+      run: npm ci
+    - name: Build
+      run: npm run build
+    - name: Deploy to GitHub Pages
+      uses: peaceiris/actions-gh-pages@v3
+      with:
+        github_token: ${{ secrets.GITHUB_TOKEN }}
+        publish_dir: ./dist
diff --git a/docs/privacy-policy.md b/docs/privacy-policy.md
deleted file mode 100644
index 9237aea..0000000
--- a/docs/privacy-policy.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# Blocknotes Privacy Policy
-
-Blocknotes does not collect any data. All the data added through the app is
-stored on your iCloud Drive. The app works completely offline and does not
-connect to the internet.
diff --git a/public/privacy-policy/index.html b/public/privacy-policy/index.html
new file mode 100644
index 0000000..4b266d2
--- /dev/null
+++ b/public/privacy-policy/index.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8" />
+<title>Blocknotes Privacy Policy</title>
+<h1>Blocknotes Privacy Policy</h1>
+<p>Blocknotes does not collect any data. All the data added through the app is
+stored on your iCloud Drive. The app works completely offline and does not
+connect to the internet.</p>
diff --git a/src/index.html b/src/index.html
index f7bed45..a366499 100644
--- a/src/index.html
+++ b/src/index.html
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html lang="en" dir="ltr">
   <head>
-    <meta charset="UTF-8" />
+    <meta charset="utf-8" />
     <title>Blocknotes</title>
     <meta
       name="viewport"