Skip to content

Commit c985b34

Browse files
authored
Merge pull request #21 from raferdev/development
Development
2 parents 0330bc6 + 29630ed commit c985b34

48 files changed

Lines changed: 967 additions & 588 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/forty-pumas-breathe.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.dockerignore

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
Dockerfile
2-
.dockerignore
1+
Dockerfile.dockerignore
32
node_modules
4-
npm-debug.log
5-
README.md
6-
.next
7-
.git
8-
.husky
9-
.changeset
10-
.vscode
11-
tests
3+
npm - debug.log
4+
README.md.next.git.husky.changeset.vscode

.github/workflows/deploy.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
name: Build and Deploy
2+
concurrency:
3+
group: production
4+
cancel-in-progress: true
5+
26
on:
37
push:
48
branches: [main]
@@ -64,22 +68,21 @@ jobs:
6468
with:
6569
name: landing-page
6670
path: out
67-
71+
- name: Filter
72+
uses: dorny/paths-filter@v2.2.1
73+
id: filter
74+
with:
75+
filters: |
76+
ngnix:
77+
- '**/*
6878
- name: Deploy Nginx
79+
if: ${{ steps.filter.outputs.ngnix }} == 'true'
6980
run: |
7081
sudo docker compose -f docker-compose.yaml build --no-cache
7182
sudo docker compose down
7283
sudo docker compose up -d
7384
7485
- name: Update content
7586
run: |
76-
sudo docker cp ./out server:/www/data/
77-
sudo docker cp ./storybook-static server:/www/data/
78-
79-
# - uses: dorny/paths-filter@v2.2.1
80-
# id: filter
81-
# with:
82-
# filters: |
83-
# ngnix:
84-
# - '**/*
85-
#
87+
sudo docker cp ./out nginx_server:/www/data/
88+
sudo docker cp ./storybook-static nginx_server:/www/data/

.github/workflows/tests.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,33 @@
11
name: Playwright Tests
22
on:
3-
push:
4-
branches: [main]
3+
pull_request:
4+
branches: [main, development]
55
jobs:
66
test:
77
timeout-minutes: 60
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v3
10+
- name: Checkout
11+
uses: actions/checkout@v3
12+
- name: Setup Node & Pnpm
13+
uses: pnpm/action-setup@v2
14+
with:
15+
version: 8.9.2
1116
- uses: actions/setup-node@v3
1217
with:
13-
node-version: 18
18+
node-version: '18'
19+
cache: 'pnpm'
20+
- name: Create env file
21+
run: |
22+
echo "${{ secrets.ENV_TEST_FILE }}" > .env.local
1423
- name: Install dependencies
15-
run: npm ci
24+
run: pnpm i
1625
- name: Install Playwright Browsers
1726
run: npx playwright install --with-deps
27+
- name: Build
28+
run: pnpm run build
1829
- name: Run Playwright tests
19-
run: npx playwright test
30+
run: pnpm run test.playwright
2031
- uses: actions/upload-artifact@v3
2132
if: always()
2233
with:

.storybook/main.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ const config: StorybookConfig = {
6969
if (!config.resolve) {
7070
throw new Error('config.resolve is undefined')
7171
}
72+
config.devtool = 'inline-source-map'
7273
config.resolve.alias = {
7374
...config.resolve.alias,
7475
'@': path.resolve(__dirname, '../src'),

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# landing-page
22

3+
## 1.8.0
4+
5+
### Minor Changes
6+
7+
- Add new link border
8+
Add aria-label
9+
Change sections images to the same size and tiny png
10+
Illustration background animation is now equal in all sections
11+
12+
## 1.7.0 2023-11-10
13+
14+
### Minor Changes
15+
16+
- 268e214: Add new cicd workflow
17+
318
## 1.6.3 - 2023-10-28
419

520
### Patch Changes

Dockerfile.test

Lines changed: 0 additions & 24 deletions
This file was deleted.

docker-compose.test.yaml

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,18 @@
11
version: '3'
22

33
services:
4-
ngnix:
5-
container_name: server
6-
restart: on-failure
7-
tty: true
8-
build: ./nginx/tests
9-
volumes:
10-
- builder_nginx_vol_tests:/www/data
11-
depends_on:
12-
- builder
4+
nginx:
5+
container_name: server_nginx
6+
restart: 'no'
7+
build:
8+
context: .
9+
dockerfile: ./nginx/tests/Dockerfile
1310
ports:
1411
- 3000:80
15-
16-
builder:
17-
env_file:
18-
- .env.local
19-
container_name: front-build
20-
build: '.'
21-
volumes:
22-
- builder_nginx_vol_tests:/app/build
12+
networks:
13+
- running-tests
2314

2415
volumes:
25-
builder_nginx_vol_tests:
16+
builder_nginx_vol:
17+
networks:
18+
running-tests:

nginx/nginx.conf

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1-
worker_processes 1;
1+
2+
worker_processes auto;
3+
24
worker_rlimit_nofile 8192;
35

46
events {
7+
worker_connections 4096;
58
}
69

710
http {
811

912
add_header X-Frame-Options "SAMEORIGIN";
1013
add_header X-XSS-Protection "1; mode=block";
11-
add_header Content-Security-Policy "script-src 'self' 'unsafe-inline' 'unsafe-eval' *.googletagmanager.com *.datadoghq-browser-agent.com; frame-src 'self' *.youtube.com; object-src 'self'";
12-
add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload';
14+
add_header Content-Security-Policy "worker-src blob:; script-src 'self' 'unsafe-inline' 'unsafe-eval' *.googletagmanager.com *.datadoghq-browser-agent.com; frame-src 'none' *.youtube.com; object-src 'none'; base-uri 'self'; form-action 'none'; frame-ancestors 'none'; default-src 'none'; style-src 'self'; img-src 'self; font-src 'self'; manifest-src 'https://rafer.dev/';"
15+
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
1316
add_header Referrer-Policy "strict-origin";
1417
add_header Permissions-Policy "geolocation=(self),midi=(),sync-xhr=(),microphone=(),camera=(),magnetometer=(),gyroscope=(),fullscreen=(),payment=()";
1518
add_header X-Content-Type-Options nosniff;
@@ -34,7 +37,7 @@ http {
3437

3538
listen 80;
3639
server_name www.rafer.dev;
37-
rewrite https://rafer.dev/$request_uri permanent;
40+
return 301 https://rafer.dev$request_uri;
3841
}
3942

4043
server {
@@ -43,6 +46,12 @@ http {
4346

4447
listen 80;
4548

49+
gzip on;
50+
gzip_types text/plain application/xml font/woff2;
51+
gzip_proxied no-cache no-store private expired auth;
52+
gzip_min_length 1000;
53+
gunzip on;
54+
4655
resolver 127.0.0.11 valid=10s;
4756
resolver_timeout 5s;
4857

nginx/tests/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ RUN mkdir /var/cache/nginx -p
77
RUN rm /etc/nginx/mime.types
88
RUN rm /etc/nginx/conf.d/default.conf
99

10-
COPY ./nginx.conf /etc/nginx/
11-
COPY ./mime.types /etc/nginx/conf/
10+
COPY ./nginx/tests/nginx.conf /etc/nginx/
11+
COPY ./nginx/tests/mime.types /etc/nginx/conf/
12+
COPY ./out /www/data/out
1213

1314
EXPOSE 80

0 commit comments

Comments
 (0)