Compare commits
10 Commits
feature/15
...
feature/20
| Author | SHA1 | Date | |
|---|---|---|---|
| aaa652a482 | |||
| 9be4e65252 | |||
| 6f7a3965a7 | |||
| a84c0d2c3d | |||
| c75b3e28da | |||
| 1140d72f42 | |||
| 299da631cb | |||
| b2bd0de4dc | |||
| 01e180e8f3 | |||
| 9e9384b808 |
@@ -15,10 +15,6 @@ env:
|
|||||||
VITE_TENANT_ID: ${{ vars.VITE_TENANT_ID }}
|
VITE_TENANT_ID: ${{ vars.VITE_TENANT_ID }}
|
||||||
VITE_REDIRECT_URL: ${{ vars.VITE_REDIRECT_URL }}
|
VITE_REDIRECT_URL: ${{ vars.VITE_REDIRECT_URL }}
|
||||||
|
|
||||||
permissions:
|
|
||||||
id-token: write
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -49,28 +45,26 @@ jobs:
|
|||||||
pnpm --filter app build
|
pnpm --filter app build
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
if: ${{ inputs.environment_name != 'pull_request' }}
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
uses: azure/login@v2
|
|
||||||
with:
|
|
||||||
client-id: ${{ vars.VITE_CLIENT_ID }}
|
|
||||||
tenant-id: ${{ vars.VITE_TENANT_ID }}
|
|
||||||
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
|
|
||||||
|
|
||||||
- name: Upload
|
|
||||||
if: ${{ inputs.environment_name != 'pull_request' }}
|
|
||||||
uses: azure/CLI@v1
|
|
||||||
with:
|
|
||||||
inlineScript: |
|
|
||||||
az storage blob upload-batch --account-name ${{ vars.AZURE_STORAGE_ACCOUNT_NAME }} --auth-mode key -d '$web' -s ./app/dist
|
|
||||||
|
|
||||||
# - name: Purge CDN endpoint
|
|
||||||
# if: ${{ inputs.environment_name != 'pull_request' }}
|
|
||||||
# uses: azure/CLI@v1
|
|
||||||
# with:
|
|
||||||
# inlineScript: |
|
|
||||||
# az cdn endpoint purge --content-paths "/*" --profile-name "CDN_PROFILE_NAME" --name "CDN_ENDPOINT" --resource-group "RESOURCE_GROUP"
|
|
||||||
|
|
||||||
- name: Azure CLI logout
|
|
||||||
if: ${{ inputs.environment_name != 'pull_request' }}
|
|
||||||
run: |
|
run: |
|
||||||
az logout
|
pnpm --filter app --prod deploy ./.prod/app
|
||||||
|
|
||||||
|
- name: Setup Docker Buildx
|
||||||
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Log into Docker Hub
|
||||||
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ vars.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and push to registry
|
||||||
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
push: true
|
||||||
|
tags: noahspan/root-app:${{ inputs.version_number }}
|
||||||
|
context: .
|
||||||
|
target: app
|
||||||
26
.github/workflows/main.yaml
vendored
26
.github/workflows/main.yaml
vendored
@@ -31,25 +31,25 @@ jobs:
|
|||||||
version_number: ${{ github.run_id }}
|
version_number: ${{ github.run_id }}
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
build-deploy-app:
|
build-app:
|
||||||
if: ${{ needs.changes.outputs.app == 'true' }}
|
if: ${{ needs.changes.outputs.app == 'true' }}
|
||||||
name: build-app
|
name: build-app
|
||||||
needs:
|
needs:
|
||||||
- changes
|
- changes
|
||||||
uses: ./.github/workflows/app_build_deploy.yaml
|
uses: ./.github/workflows/app_build.yaml
|
||||||
with:
|
with:
|
||||||
environment_name: test
|
environment_name: test
|
||||||
version_number: ${{ github.run_id }}
|
version_number: ${{ github.run_id }}
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
# deploy-app:
|
deploy-app:
|
||||||
# name: deploy-app
|
name: deploy-app
|
||||||
# needs:
|
needs:
|
||||||
# - changes
|
- changes
|
||||||
# - build-app
|
- build-app
|
||||||
# uses: ./.github/workflows/deploy.yaml
|
uses: ./.github/workflows/deploy.yaml
|
||||||
# with:
|
with:
|
||||||
# app_name: root-app
|
app_name: root-app
|
||||||
# environment_name: test
|
environment_name: test
|
||||||
# version_number: ${{ github.run_id }}
|
version_number: ${{ github.run_id }}
|
||||||
# secrets: inherit
|
secrets: inherit
|
||||||
|
|||||||
2
.github/workflows/pull_request.yaml
vendored
2
.github/workflows/pull_request.yaml
vendored
@@ -23,7 +23,7 @@ jobs:
|
|||||||
name: build-app
|
name: build-app
|
||||||
needs:
|
needs:
|
||||||
- changes
|
- changes
|
||||||
uses: ./.github/workflows/app_build_deploy.yaml
|
uses: ./.github/workflows/app_build.yaml
|
||||||
with:
|
with:
|
||||||
environment_name: pull_request
|
environment_name: pull_request
|
||||||
version_number: ${{ github.run_id }}
|
version_number: ${{ github.run_id }}
|
||||||
|
|||||||
@@ -1,73 +0,0 @@
|
|||||||
<p align="center">
|
|
||||||
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="200" alt="Nest Logo" /></a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
|
|
||||||
[circleci-url]: https://circleci.com/gh/nestjs/nest
|
|
||||||
|
|
||||||
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
|
|
||||||
<p align="center">
|
|
||||||
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
|
|
||||||
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
|
|
||||||
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a>
|
|
||||||
<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
|
|
||||||
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
|
|
||||||
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
|
|
||||||
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
|
|
||||||
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
|
|
||||||
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
|
|
||||||
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a>
|
|
||||||
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
|
|
||||||
</p>
|
|
||||||
<!--[](https://opencollective.com/nest#backer)
|
|
||||||
[](https://opencollective.com/nest#sponsor)-->
|
|
||||||
|
|
||||||
## Description
|
|
||||||
|
|
||||||
[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ npm install
|
|
||||||
```
|
|
||||||
|
|
||||||
## Running the app
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# development
|
|
||||||
$ npm run start
|
|
||||||
|
|
||||||
# watch mode
|
|
||||||
$ npm run start:dev
|
|
||||||
|
|
||||||
# production mode
|
|
||||||
$ npm run start:prod
|
|
||||||
```
|
|
||||||
|
|
||||||
## Test
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# unit tests
|
|
||||||
$ npm run test
|
|
||||||
|
|
||||||
# e2e tests
|
|
||||||
$ npm run test:e2e
|
|
||||||
|
|
||||||
# test coverage
|
|
||||||
$ npm run test:cov
|
|
||||||
```
|
|
||||||
|
|
||||||
## Support
|
|
||||||
|
|
||||||
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
|
|
||||||
|
|
||||||
## Stay in touch
|
|
||||||
|
|
||||||
- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com)
|
|
||||||
- Website - [https://nestjs.com](https://nestjs.com/)
|
|
||||||
- Twitter - [@nestframework](https://twitter.com/nestframework)
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
Nest is [MIT licensed](LICENSE).
|
|
||||||
|
|||||||
@@ -1,50 +1 @@
|
|||||||
# React + TypeScript + Vite
|
# APP
|
||||||
|
|
||||||
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
|
|
||||||
export default tseslint.config({
|
|
||||||
languageOptions: {
|
|
||||||
// other options...
|
|
||||||
parserOptions: {
|
|
||||||
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
||||||
tsconfigRootDir: import.meta.dirname,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
```
|
|
||||||
|
|
||||||
- Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked`
|
|
||||||
- Optionally add `...tseslint.configs.stylisticTypeChecked`
|
|
||||||
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config:
|
|
||||||
|
|
||||||
```js
|
|
||||||
// eslint.config.js
|
|
||||||
import react from 'eslint-plugin-react'
|
|
||||||
|
|
||||||
export default tseslint.config({
|
|
||||||
// Set the react version
|
|
||||||
settings: { react: { version: '18.3' } },
|
|
||||||
plugins: {
|
|
||||||
// Add the react plugin
|
|
||||||
react,
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
// other rules...
|
|
||||||
// Enable its recommended rules
|
|
||||||
...react.configs.recommended.rules,
|
|
||||||
...react.configs['jsx-runtime'].rules,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
```
|
|
||||||
@@ -38,8 +38,8 @@ const Projects = () => {
|
|||||||
`api/projects`,
|
`api/projects`,
|
||||||
);
|
);
|
||||||
const projects: Project[] = response.data;
|
const projects: Project[] = response.data;
|
||||||
console.log(projects);
|
|
||||||
projects.sort((a, b) => Number(a.order) - Number(b.order))
|
projects.sort((a, b) => Number(a.order) - Number(b.order));
|
||||||
|
|
||||||
return projects;
|
return projects;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -125,8 +125,16 @@ const Projects = () => {
|
|||||||
try {
|
try {
|
||||||
dispatch({ type: 'SET_IS_LOADING', payload: true })
|
dispatch({ type: 'SET_IS_LOADING', payload: true })
|
||||||
const projects = await getProjects();
|
const projects = await getProjects();
|
||||||
|
|
||||||
|
if (projects.length > 0) {
|
||||||
|
dispatch({ type: 'SET_PROJECTS', payload: projects });
|
||||||
|
|
||||||
dispatch({ type: 'SET_PROJECTS', payload: projects })
|
if (state.alert) {
|
||||||
|
dispatch({ type: 'SET_ALERT', payload: undefined })
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
dispatch({ type: 'SET_ALERT', payload: { severity: 'info', message: 'No projects found.'}});
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: 'SET_ALERT',
|
type: 'SET_ALERT',
|
||||||
|
|||||||
@@ -56,6 +56,12 @@ locals {
|
|||||||
index_document = "index.html"
|
index_document = "index.html"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
prod = [
|
||||||
|
{
|
||||||
|
error_404_document = "custom_not_found.html"
|
||||||
|
index_document = "index.html"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
storage_account_name = {
|
storage_account_name = {
|
||||||
@@ -73,6 +79,15 @@ locals {
|
|||||||
source = "index.html"
|
source = "index.html"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
prod = [
|
||||||
|
{
|
||||||
|
name = "web"
|
||||||
|
storage_container_name = "$web"
|
||||||
|
type = "Block"
|
||||||
|
content_type = "text/html"
|
||||||
|
source = "index.html"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
storage_tables = {
|
storage_tables = {
|
||||||
|
|||||||
Reference in New Issue
Block a user