Skip to content

Commit

Permalink
fix: update base repository
Browse files Browse the repository at this point in the history
  • Loading branch information
juancarlosfarah committed Jan 12, 2024
1 parent faf9a91 commit 8c63a37
Show file tree
Hide file tree
Showing 12 changed files with 1,044 additions and 1,481 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
build:
concurrency: build-${{ github.head_ref || github.ref }}
concurrency: build-${{ github.head_ref || github.ref }}
runs-on: ubuntu-latest
steps:
- name: checkout
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
cypress-run:
concurrency: cypress-${{ github.head_ref || github.ref }}
concurrency: cypress-${{ github.head_ref || github.ref }}
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -16,7 +16,6 @@ jobs:
with:
cypress: true


- name: Build App
run: yarn build:test
shell: bash
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Yarn build
# Set environment variables required to perform the build. These are only available to this step
env:
VITE_API_HOST: ${{ secrets.REACT_APP_API_HOST_DEV }}
VITE_API_HOST: ${{ vars.VITE_API_HOST }}
VITE_GRAASP_APP_KEY: ${{ secrets.APP_KEY }}
VITE_SENTRY_ENV: development
VITE_SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
Expand All @@ -43,6 +43,6 @@ jobs:
version: 'latest'
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_DEV }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_DEV }}
aws-region: ${{ secrets.APPS_AWS_REGION }}
aws-s3-bucket-name: ${{ secrets.AWS_S3_BUCKET_NAME_APPS_DEV }}
aws-region: ${{ vars.APPS_AWS_REGION_DEV }}
aws-s3-bucket-name: ${{ vars.AWS_S3_BUCKET_NAME_APPS_DEV }}
cloudfront-distribution-id: ${{ secrets.CLOUDFRONT_DISTRIBUTION_APPS_DEV }}
52 changes: 52 additions & 0 deletions .github/workflows/deploy-github.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Deploy to GitHub Pages

# Controls when the action will run
on:
# Triggers the workflow on repository-dispatch event
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

jobs:
build:
runs-on: ubuntu-latest
environment: production
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Yarn install and Cache dependencies
uses: graasp/graasp-deploy/.github/actions/yarn-install-and-cache@v1

- name: Yarn build
# Set environment variables required to perform the build. These are only available to this step
env:
VITE_API_HOST: ${{ vars.VITE_API_HOST }}
VITE_GRAASP_APP_KEY: ${{ secrets.APP_KEY }}
VITE_SENTRY_ENV: production
VITE_SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
VITE_VERSION: github-${{ github.sha }}
# add any env variable needed by your app here
run: yarn build
shell: bash

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./build

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
8 changes: 4 additions & 4 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy to staging environment
name: Deploy to production environment

# Controls when the action will run
on:
Expand All @@ -23,7 +23,7 @@ jobs:
- name: Yarn build
# Set environment variables required to perform the build. These are only available to this step
env:
VITE_API_HOST: ${{ secrets.REACT_APP_API_HOST_PROD }}
VITE_API_HOST: ${{ vars.VITE_API_HOST }}
VITE_GRAASP_APP_KEY: ${{ secrets.APP_KEY }}
VITE_SENTRY_ENV: production
VITE_SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
Expand All @@ -41,6 +41,6 @@ jobs:
version: 'latest'
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_PROD }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_PROD }}
aws-region: ${{ secrets.APPS_AWS_REGION }}
aws-s3-bucket-name: ${{ secrets.AWS_S3_BUCKET_NAME_APPS_PROD }}
aws-region: ${{ vars.APPS_AWS_REGION_PROD }}
aws-s3-bucket-name: ${{ vars.AWS_S3_BUCKET_NAME_APPS_PROD }}
cloudfront-distribution-id: ${{ secrets.CLOUDFRONT_DISTRIBUTION_APPS_PROD }}
8 changes: 4 additions & 4 deletions .github/workflows/deploy-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
deploy-app:
name: Deploy to dev
name: Deploy to staging
runs-on: ubuntu-latest
environment: staging
steps:
Expand All @@ -23,7 +23,7 @@ jobs:
- name: Yarn build
# Set environment variables required to perform the build. These are only available to this step
env:
VITE_API_HOST: ${{ secrets.REACT_APP_API_HOST_STAGE }}
VITE_API_HOST: ${{ vars.VITE_API_HOST }}
VITE_GRAASP_APP_KEY: ${{ secrets.APP_KEY }}
VITE_SENTRY_ENV: staging
VITE_SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
Expand All @@ -41,6 +41,6 @@ jobs:
version: 'latest'
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_STAGE }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_STAGE }}
aws-region: ${{ secrets.APPS_AWS_REGION }}
aws-s3-bucket-name: ${{ secrets.AWS_S3_BUCKET_NAME_APPS_STAGE }}
aws-region: ${{ vars.APPS_AWS_REGION_STAGE }}
aws-s3-bucket-name: ${{ vars.AWS_S3_BUCKET_NAME_APPS_STAGE }}
cloudfront-distribution-id: ${{ secrets.CLOUDFRONT_DISTRIBUTION_APPS_STAGE }}
17 changes: 3 additions & 14 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,15 @@ jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
- uses: google-github-actions/release-please-action@v4
id: release
with:
release-type: node
package-name: graasp-app-starter-ts-vite
changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"docs","section":"Documentation","hidden":false},{"type":"test","section":"Tests","hidden":false}]'

- uses: actions/checkout@v4
with:
ref: main

- name: Tag major and minor versions
uses: jacobsvante/[email protected]
if: ${{ steps.release.outputs.releases_created }}
with:
major: ${{ steps.release.outputs.major }}
minor: ${{ steps.release.outputs.minor }}

- name: Set tag
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.releases_created == 'true' }}
id: set-tag
run: |
REPOSITORY=$(echo '${{ github.repository }}')
Expand All @@ -38,7 +27,7 @@ jobs:
# Trigger an 'on: repository_dispatch' workflow to run in graasp-deploy repository
- name: Push tag to Graasp Deploy (Staging)
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.releases_created == 'true' }}
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
Expand Down
2 changes: 2 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ enableGlobalCache: false
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.0.2.cjs

defaultSemverRangePrefix: ""
39 changes: 20 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,32 @@
"license": "AGPL-3.0-only",
"author": "Graasp",
"contributors": [
"Juan Carlos Farah"
"Juan Carlos Farah",
"Basile Spaenlehauer"
],
"homepage": ".",
"type": "module",
"dependencies": {
"@emotion/react": "11.11.1",
"@emotion/styled": "11.11.0",
"@graasp/apps-query-client": "3.1.0",
"@graasp/sdk": "3.0.1",
"@graasp/apps-query-client": "3.2.1",
"@graasp/sdk": "3.3.0",
"@graasp/ui": "4.1.1",
"@mui/icons-material": "5.14.19",
"@mui/lab": "5.0.0-alpha.156",
"@mui/material": "5.14.20",
"@sentry/react": "7.80.1",
"@mui/icons-material": "5.15.1",
"@mui/lab": "5.0.0-alpha.160",
"@mui/material": "5.15.1",
"@sentry/react": "7.86.0",
"@tanstack/react-query": "4.36.1",
"@tanstack/react-query-devtools": "4.36.1",
"@types/node": "20.9.5",
"@types/react": "18.2.45",
"@types/node": "20.10.4",
"@types/react": "18.2.42",
"@types/react-dom": "18.2.17",
"i18next": "23.7.9",
"i18next": "23.7.11",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-i18next": "13.5.0",
"react-toastify": "9.1.3",
"typescript": "5.2.2"
"typescript": "5.3.3"
},
"scripts": {
"dev": "yarn vite",
Expand All @@ -55,18 +56,18 @@
"devDependencies": {
"@commitlint/cli": "18.4.3",
"@commitlint/config-conventional": "18.4.3",
"@cypress/code-coverage": "3.12.13",
"@cypress/code-coverage": "3.12.15",
"@trivago/prettier-plugin-sort-imports": "4.3.0",
"@types/i18n": "0.13.10",
"@types/uuid": "9.0.7",
"@typescript-eslint/eslint-plugin": "6.14.0",
"@typescript-eslint/parser": "6.14.0",
"@typescript-eslint/eslint-plugin": "6.18.1",
"@typescript-eslint/parser": "6.18.1",
"@vitejs/plugin-react": "4.2.1",
"axios": "0.27.2",
"concurrently": "8.2.2",
"cypress": "13.5.1",
"cypress": "13.6.1",
"env-cmd": "10.1.0",
"eslint": "8.55.0",
"eslint": "8.56.0",
"eslint-config-airbnb": "19.0.4",
"eslint-config-airbnb-typescript": "17.1.0",
"eslint-config-prettier": "9.1.0",
Expand All @@ -75,16 +76,16 @@
"eslint-plugin-cypress": "2.15.1",
"eslint-plugin-import": "2.29.0",
"eslint-plugin-jsx-a11y": "6.8.0",
"eslint-plugin-prettier": "5.0.1",
"eslint-plugin-prettier": "5.1.1",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-react-hooks": "4.6.0",
"husky": "8.0.3",
"miragejs": "0.1.48",
"nock": "13.3.8",
"nock": "13.4.0",
"nyc": "15.1.0",
"prettier": "3.1.1",
"uuid": "9.0.1",
"vite": "5.0.8",
"vite": "5.0.6",
"vite-plugin-checker": "0.6.2",
"vite-plugin-istanbul": "5.0.0"
},
Expand Down
Loading

0 comments on commit 8c63a37

Please sign in to comment.