From f77aeeed07808e59c75a75136c0fb5b71d78579e Mon Sep 17 00:00:00 2001 From: Akeko Date: Thu, 21 Mar 2024 23:19:14 +0100 Subject: [PATCH] ci: githubactions deploy file + redirect file --- .github/workflows/deploy.yml | 35 +++++++++++++++++++++++++++++++++++ client/htaccess | 9 +++++++++ 2 files changed, 44 insertions(+) create mode 100644 .github/workflows/deploy.yml create mode 100644 client/htaccess diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..3c97b85 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,35 @@ +on: + push: + branches: + - main +name: 🚀 Deploy website on + +jobs: + web-deploy: + name: 🎉 Deploy + runs-on: unbuntu-lastest + steps: + - name: 🚚 Get lastest code + uses: actions/checkout@v3 + + - name: Use Node.js 20 + uses: actions/setup-node@v2 + with: + node-version: "20" + + - name: 🔨 Build FrontEnd + run: | + cd client + npm install + npm run build + + - name: 🔨 Build BackEnd + run: | + cd server + npm install + npm run start + + - name: 📁 Sync File + uses: AkekoChan/flami-app + with: + server: diff --git a/client/htaccess b/client/htaccess new file mode 100644 index 0000000..22480da --- /dev/null +++ b/client/htaccess @@ -0,0 +1,9 @@ + + RewriteEngine On + RewriteBase / + RewriteRule ^index\.html$ - [L] + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_FILENAME} !-l + RewriteRule . /index.html [L] +