diff --git a/.git-hooks/pre-commit b/.git-hooks/pre-commit deleted file mode 100644 index 2cb1185..0000000 --- a/.git-hooks/pre-commit +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -fileList=$(git diff --staged --name-only :^package-lock.json :^README.md :^client :^server) - -echo '----- Checking Root...' - -if [ ! -z "$fileList" ] -then - echo "error: Unauthorized modifications\n" - - echo "$fileList\n" - - echo "use 'git restore --staged ...' to fix the problem" - echo "(and ask your instructor why you should not change these files)\n" - - exit 1 -fi - -echo '----- Done!' - -npx validate-branch-name -npm run check diff --git a/.github/workflows/deploy-traefik.yml b/.github/workflows/deploy-traefik.yml deleted file mode 100644 index 08ccdf9..0000000 --- a/.github/workflows/deploy-traefik.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: CD-traefik - -on: - push: - branches: - - staging - -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - name: Deploy to VPS - uses: appleboy/ssh-action@master - with: - username: ${{ secrets.SSH_USER }} - host: ${{ secrets.SSH_HOST }} - password: ${{ secrets.SSH_PASSWORD }} - script: cd && cd traefik/deploy && bash ./js-project.sh ${{ github.event.repository.owner.name }} ${{ github.event.repository.name }} ${{ vars.PROJECT_NAME }} '${{ toJSON(vars) }}' diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 30e0cbd..81f1964 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,12 +19,18 @@ jobs: with: ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} + - name: Setup known_hosts + run: | + mkdir -p ~/.ssh + echo "${{ secrets.VPS_KNOWN_HOST }}" > ~/.ssh/known_hosts + chmod 644 ~/.ssh/known_hosts + - name: Deploy run: | if [ "${{ github.ref }}" = "refs/heads/main" ]; then echo "đ Deploying PRODUCTION" - ssh -o StrictHostKeyChecking=no ${{ secrets.VPS_USER }}@${{ secrets.VPS_HOST }} "bash /home/ubuntu/deploy-triptogether.sh" + ssh ${{ secrets.VPS_USER }}@${{ secrets.VPS_HOST }} "bash /home/ubuntu/deploy-triptogether.sh" else echo "đ§Ș Deploying STAGING" - ssh -o StrictHostKeyChecking=no ${{ secrets.VPS_USER }}@${{ secrets.VPS_HOST }} "bash /home/ubuntu/deploy-triptogether-staging.sh" + ssh ${{ secrets.VPS_USER }}@${{ secrets.VPS_HOST }} "bash /home/ubuntu/deploy-triptogether-staging.sh" fi diff --git a/.github/workflows/remove.yml b/.github/workflows/remove.yml deleted file mode 100644 index 3c99c36..0000000 --- a/.github/workflows/remove.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Remove-from-Traefik - -on: - workflow_dispatch: - -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - name: Remove from VPS - uses: appleboy/ssh-action@master - with: - username: ${{ secrets.SSH_USER }} - host: ${{ secrets.SSH_HOST }} - password: ${{ secrets.SSH_PASSWORD }} - script: cd && cd traefik/deploy && bash ./remove-project.sh ${{ github.event.repository.name }} diff --git a/client/src/components/Navbar.tsx b/client/src/components/Navbar.tsx index 776d885..bffff1a 100644 --- a/client/src/components/Navbar.tsx +++ b/client/src/components/Navbar.tsx @@ -56,15 +56,11 @@ export default function Navbar() { className="navbar-cta" onClick={navigateToCreateTrip} > - CrĂ©e ton voyage ! + CrĂ©er un voyage )} -