Skip to content

Commit 9326d13

Browse files
Deployment ready
1 parent 0200018 commit 9326d13

File tree

3 files changed

+67
-0
lines changed

3 files changed

+67
-0
lines changed

.github/workflows/deploy.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
name: 🚀 Deploy website on push
6+
7+
jobs:
8+
web-deploy:
9+
name: 🎉 Deploy
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: 🚚 Get latest code
13+
uses: actions/checkout@v3
14+
15+
- name: Use Node.js 16
16+
uses: actions/setup-node@v2
17+
with:
18+
node-version: '16'
19+
20+
- name: 🔨 Build Project
21+
run: |
22+
npm install
23+
npm run build
24+
npm run test
25+
26+
- name: 📂 Sync files
27+
uses: SamKirkland/[email protected]
28+
with:
29+
server: ${{ secrets.GIT_CPANEL_REACT_SERVER }}
30+
username: ${{ secrets.GIT_CPANEL_REACT_USER }}
31+
password: ${{ secrets.GIT_CPANEL_REACT_PWD }}
32+
protocol: ${{ secrets.GIT_CPANEL_REACT_PROTOCOL }}
33+
local-dir: ./build/

.htaccess

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Options -MultiViews
2+
RewriteEngine On
3+
4+
# Redirect to HTTPS
5+
RewriteCond %{HTTPS} off
6+
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
7+
8+
# Rewrite all non-file requests to index.html
9+
RewriteCond %{REQUEST_FILENAME} !-f
10+
RewriteRule ^ index.html [QSA,L]
11+
12+
# php -- BEGIN cPanel-generated handler, do not edit
13+
# Set the “ea-php74” package as the default “PHP” programming language.
14+
<IfModule mime_module>
15+
AddHandler application/x-httpd-ea-php74 .php .php7 .phtml
16+
</IfModule>
17+
# php -- END cPanel-generated handler, do not edit

public/.htaccess

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Options -MultiViews
2+
RewriteEngine On
3+
4+
# Redirect to HTTPS
5+
RewriteCond %{HTTPS} off
6+
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
7+
8+
# Rewrite all non-file requests to index.html
9+
RewriteCond %{REQUEST_FILENAME} !-f
10+
RewriteRule ^ index.html [QSA,L]
11+
12+
# php -- BEGIN cPanel-generated handler, do not edit
13+
# Set the “ea-php74” package as the default “PHP” programming language.
14+
<IfModule mime_module>
15+
AddHandler application/x-httpd-ea-php74 .php .php7 .phtml
16+
</IfModule>
17+
# php -- END cPanel-generated handler, do not edit

0 commit comments

Comments
 (0)