-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from healthy-food-and-dietary-products/develop
Develop
- Loading branch information
Showing
270 changed files
with
18,907 additions
and
270 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,2 @@ | ||
node_modules | ||
dist |
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,4 @@ | ||
# Adding this to your .gitattributes file will make it so all files | ||
# are checked in using UNIX line endings while letting anyone on the team | ||
# edit files using their local operating system’s default line endings. | ||
* text=auto |
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,92 @@ | ||
name: good_food_frontend workflow | ||
|
||
on: | ||
push: | ||
branches: | ||
|
||
jobs: | ||
check_codestyle: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '18.x' | ||
- name: Install and check codestyle | ||
run: | | ||
npm ci | ||
npm run lint:js | ||
npm run lint:styles | ||
npm run lint:prettier | ||
- name: send message | ||
if: ${{ github.ref != 'refs/heads/develop' || github.ref != 'refs/heads/main' }} | ||
uses: appleboy/telegram-action@master | ||
with: | ||
to: ${{ secrets.TELEGRAM_TO }} | ||
token: ${{ secrets.TELEGRAM_TOKEN }} | ||
message: | | ||
${{ github.workflow }} completed successfully! | ||
Repository: ${{ github.repository }}. | ||
Branch name: ${{ github.ref_name }}. | ||
Commit author: ${{ github.actor }}. | ||
Commit message: ${{ github.event.commits[0].message }}. | ||
See changes: https://github.com/${{ github.repository }}/commit/${{github.sha}} | ||
build_and_push_to_docker_hub: | ||
name: Push Docker image to Docker Hub | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main' | ||
|
||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to Docker | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Push frontend to Docker Hub | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
push: true | ||
tags: ${{ secrets.DOCKER_USERNAME }}/good_food_frontend:v.01 | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
needs: build_and_push_to_docker_hub | ||
steps: | ||
- name: executing remote ssh commands to deploy | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.SSH_HOST }} | ||
username: ${{ secrets.SSH_USER }} | ||
key: ${{ secrets.SSH_KEY }} | ||
# passphrase: ${{ secrets.SSH_PASSPHRASE }} | ||
script: | | ||
echo ${{ secrets.SSH_HOST_USER_PASSWORD }} | sudo -S docker compose stop | ||
sudo docker pull ${{ secrets.DOCKER_USERNAME }}/good_food_frontend:v.01 | ||
sudo docker compose up -d | ||
echo ${{ secrets.SSH_HOST_USER_PASSWORD }} | sudo -S docker image prune -f | ||
send_message: | ||
runs-on: ubuntu-latest | ||
needs: deploy | ||
steps: | ||
- name: send message | ||
uses: appleboy/telegram-action@master | ||
with: | ||
to: ${{ secrets.TELEGRAM_TO }} | ||
token: ${{ secrets.TELEGRAM_TOKEN }} | ||
message: | | ||
${{ github.workflow }} completed successfully! | ||
Repository: ${{ github.repository }}. | ||
Branch name: ${{ github.ref_name }}. | ||
Commit author: ${{ github.actor }}. | ||
Commit message: ${{ github.event.commits[0].message }}. | ||
See changes: https://github.com/${{ github.repository }}/commit/${{github.sha}} |
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 |
---|---|---|
|
@@ -6,5 +6,5 @@ | |
"trailingComma": "es5", | ||
"singleQuote": true, | ||
"bracketSpacing": true, | ||
"endOfLine": "lf" | ||
"endOfLine": "auto" | ||
} |
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 node:20.9.0-alpine as build | ||
WORKDIR /app | ||
COPY package*.json . | ||
RUN npm install | ||
COPY . . | ||
RUN npm run build | ||
CMD cp -r build result_build |
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 |
---|---|---|
@@ -1,29 +1,7 @@ | ||
# React + TypeScript + Vite | ||
# GoodFood | ||
|
||
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. | ||
# Платформа для онлайн-продажи и доставки здоровой пищи и диетических продуктов | ||
|
||
Currently, two official plugins are available: | ||
|
||
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh | ||
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh | ||
|
||
## Expanding the ESLint configuration | ||
|
||
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: | ||
|
||
- Configure the top-level `parserOptions` property like this: | ||
|
||
```js | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
project: ['./tsconfig.json', './tsconfig.node.json'], | ||
tsconfigRootDir: __dirname, | ||
}, | ||
``` | ||
|
||
- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked` | ||
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked` | ||
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list | ||
![good_food_frontend workflow](https://github.com/healthy-food-and-dietary-products/frontend/actions/workflows/good_food_frontend_workflow.yaml/badge.svg) | ||
|
||
### Подробная информация по работе с проектом в файле `CONTRIBUTE.MD` |
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
Oops, something went wrong.