Skip to content

Commit c3a5a49

Browse files
committed
Changed config and added debug to secrets
1 parent f4491cb commit c3a5a49

File tree

3 files changed

+22
-25
lines changed

3 files changed

+22
-25
lines changed

.github/workflows/ftp-deploy.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,26 @@ jobs:
1717
- name: Checkout code
1818
uses: actions/checkout@v3
1919

20+
- name: Debug
21+
run: |
22+
if [ -n "${{ secrets.FTP_SERVER }}" ]; then
23+
echo "FTP_SERVER is set"
24+
else
25+
echo "FTP_SERVER is NOT set"
26+
fi
27+
28+
if [ -n "${{ secrets.FTP_USERNAME }}" ]; then
29+
echo "FTP_USERNAME is set"
30+
else
31+
echo "FTP_USERNAME is NOT set"
32+
fi
33+
34+
if [ -n "${{ secrets.FTP_PASSWORD }}" ]; then
35+
echo "FTP_PASSWORD is set"
36+
else
37+
echo "FTP_PASSWORD is NOT set"
38+
fi
39+
2040
- name: Deploy to FTP
2141
uses: SamKirkland/FTP-Deploy-Action@v4.3.4
2242
with:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"scripts": {
77
"dev": "vite",
88
"preview": "vite preview",
9-
"build": "vite build",
9+
"build": "vite build && shx cp .htaccess dist/",
1010
"type-check": "vue-tsc --build"
1111
},
1212
"dependencies": {

vite.config.ts

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,11 @@ import { defineConfig } from "vite";
22
import vue from "@vitejs/plugin-vue";
33
import vueJsx from "@vitejs/plugin-vue-jsx";
44
import vueDevTools from "vite-plugin-vue-devtools";
5-
import { resolve } from "path";
6-
import fs from "fs";
75

86
// https://vite.dev/config/
97
export default defineConfig({
108
base: "/",
11-
plugins: [
12-
vue(),
13-
vueJsx(),
14-
vueDevTools(),
15-
{
16-
name: "copy-htaccess",
17-
closeBundle() {
18-
// Path to your .htaccess file
19-
const htaccessPath = resolve(__dirname, ".htaccess");
20-
// Destination path in dist directory
21-
const distHtaccessPath = resolve(__dirname, "dist", ".htaccess");
22-
23-
// Copy the .htaccess file to the dist directory
24-
if (fs.existsSync(htaccessPath)) {
25-
fs.copyFileSync(htaccessPath, distHtaccessPath);
26-
console.log(".htaccess file copied to dist directory");
27-
} else {
28-
console.warn(".htaccess file not found at project root");
29-
}
30-
},
31-
},
32-
],
9+
plugins: [vue(), vueJsx(), vueDevTools()],
3310
assetsInclude: ["**/*.md"],
3411
define: {
3512
"process.env": {},

0 commit comments

Comments
 (0)