-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
137 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | ||
|
||
name: Node.js CI | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
env: | ||
working-directory: ./src/Frontend | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
#cache: 'npm' | ||
- name: Clean slate | ||
run: npm ci | ||
working-directory: ${{env.working-directory}} | ||
- name: Install quasar | ||
run: npm install -g @quasar/cli | ||
working-directory: ${{env.working-directory}} | ||
- name: Build | ||
run: quasar build | ||
working-directory: ${{env.working-directory}} | ||
- name: Deploy 🚀 | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
folder: src/Frontend/dist/spa/ # The folder the action should deploy. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM nginx:alpine | ||
|
||
# Listen ports | ||
EXPOSE 80 | ||
|
||
COPY src/nginx-default.conf /etc/nginx/conf.d/default.conf | ||
COPY spa /usr/share/nginx/html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
server { | ||
listen 80; | ||
server_name localhost; | ||
|
||
root /usr/share/nginx/html; | ||
index index.html; | ||
|
||
# This will enforce HTTP browsing into HTTPS and avoid ssl stripping attack | ||
add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload'; | ||
|
||
# This header enables the Cross-site scripting (XSS) filter | ||
add_header X-XSS-Protection "1; mode=block"; | ||
|
||
# X-Frame-Options is to prevent from clickJacking attack | ||
add_header X-Frame-Options SAMEORIGIN; | ||
|
||
# disable content-type sniffing on some browsers. | ||
add_header X-Content-Type-Options nosniff; | ||
|
||
location / { | ||
add_header Cache-Control "no-store, no-cache, must-revalidate"; | ||
try_files $uri $uri/ /index.html; | ||
} | ||
|
||
location /css/ { | ||
expires 365d; | ||
add_header Cache-Control "public"; | ||
} | ||
|
||
location /js/ { | ||
expires 365d; | ||
add_header Cache-Control "public"; | ||
} | ||
|
||
location /fonts/ { | ||
expires 365d; | ||
add_header Cache-Control "public"; | ||
} | ||
|
||
location ~* \.(ico|jpg|jpeg|png|gif|svg|webp)$ { | ||
expires 365d; | ||
etag off; | ||
if_modified_since off; | ||
add_header Cache-Control "public, no-transform"; | ||
} | ||
} |