From 6979eb4b83e41334acf21399e18e3ef915a06e4b Mon Sep 17 00:00:00 2001 From: "ahmed.mujtaba" Date: Mon, 7 Sep 2026 19:46:25 +0500 Subject: [PATCH 1/2] removed the /yml files --- .gitea/workflows/ci.yml | 36 ------------ .gitea/workflows/deploy-to-s3.yml | 94 ------------------------------- 2 files changed, 130 deletions(-) delete mode 100644 .gitea/workflows/ci.yml delete mode 100644 .gitea/workflows/deploy-to-s3.yml diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml deleted file mode 100644 index 7db53b6..0000000 --- a/.gitea/workflows/ci.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: CI - -# Same checks deploy-to-s3.yml gates on, run before a change reaches main. -# main itself is excluded because the deploy workflow already runs them there; -# without branches-ignore every merge would run the suite twice. -on: - push: - branches-ignore: - - main - pull_request: - -jobs: - checks: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Set up Node - uses: actions/setup-node@v4 - with: - node-version: '22' - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - - name: Install Python dependencies - run: | - python -m pip install --upgrade pip - pip install -e ".[dev]" - pip install -r backend/requirements.txt - - - name: Run checks - run: bash scripts/ci-checks.sh diff --git a/.gitea/workflows/deploy-to-s3.yml b/.gitea/workflows/deploy-to-s3.yml deleted file mode 100644 index c5883f0..0000000 --- a/.gitea/workflows/deploy-to-s3.yml +++ /dev/null @@ -1,94 +0,0 @@ -name: Deploy to S3 - -# main only. Everything else is covered by ci.yml, which runs the same checks -# without deploying. -on: - push: - branches: - - main - -jobs: - # Nothing was verified before this existed: a frontend that failed to compile - # would zip and ship exactly like a working one. `deploy` now needs this job, - # so a red main does not reach the bucket. - checks: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - # 22 to match frontend/Dockerfile, so CI resolves the same tree the - # production image builds from. - - name: Set up Node - uses: actions/setup-node@v4 - with: - node-version: '22' - - # 3.11 is the floor in pyproject.toml and the version the project's conda - # env runs. - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - - name: Install Python dependencies - run: | - python -m pip install --upgrade pip - pip install -e ".[dev]" - pip install -r backend/requirements.txt - - - name: Run checks - run: bash scripts/ci-checks.sh - - deploy: - needs: checks - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - # frontend/node_modules is excluded, and that is safe because of what - # happens to this object downstream. CodeDeploy pulls it, extracts to - # /opt/codedeploy-extracted-5, copies the tree to - # /home/ec2-user/utopia-ai-hr-ats-portal-deployment-group and runs - # `docker compose --env-file ./backend/.env up -d --build`. The only Node - # service is the frontend, whose image does `npm ci` from the lockfile, - # and frontend/.dockerignore excludes node_modules/ from the build context - # outright. So the committed tree was carried into every artifact and then - # thrown away unread. It was 90 MB of a 33 MB compressed upload. - # - # node_modules is still tracked in git, which is the reason it was here at - # all. Untracking it is a separate change and affects other branches. - - name: Archive project - run: | - apt-get update -y - apt-get install -y zip - zip -r utopia-ai-hr-ats-portal.zip . \ - -x ".git/*" \ - -x ".gitea/*" \ - -x ".gitignore" \ - -x "frontend/node_modules/*" \ - -x "*.DS_Store" - - - name: Install AWS CLI - run: | - apt-get update -y - apt-get install -y curl unzip - curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" - unzip -q awscliv2.zip - ./aws/install - aws --version - - # The credentials live only on this step. There used to be a separate - # "Configure AWS credentials" step above that set the same three variables - # and then only echoed a message — env: is scoped to its own step, so - # those values were discarded before anything could use them. It was doing - # nothing, and it read as though credentials were set up globally. - - name: Upload files to S3 - env: - AWS_ACCESS_KEY_ID: ${{ secrets.DEVOPS_USER_AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.DEVOPS_USER_AWS_SECRET_ACCESS_KEY }} - AWS_DEFAULT_REGION: us-east-1 - run: | - echo "Uploading repo contents to S3..." - aws s3 cp utopia-ai-hr-ats-portal.zip s3://utopia-ai-s3-repo-bucket/utopia-ai-hr-ats-portal.zip From 1fd40c3f7feb4dcdc8381b72a8e3b16510469228 Mon Sep 17 00:00:00 2001 From: "ahmed.mujtaba" Date: Mon, 7 Sep 2026 19:52:21 +0500 Subject: [PATCH 2/2] se coorected --- .gitea/workflows/deploy-to-s3.yml | 79 +++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 .gitea/workflows/deploy-to-s3.yml diff --git a/.gitea/workflows/deploy-to-s3.yml b/.gitea/workflows/deploy-to-s3.yml new file mode 100644 index 0000000..fb7f15c --- /dev/null +++ b/.gitea/workflows/deploy-to-s3.yml @@ -0,0 +1,79 @@ +name: Deploy to S3 + +on: + push: + branches: + - main + +jobs: + # Nothing was verified before this existed: a frontend that failed to compile + # would zip and ship exactly like a working one. `deploy` now needs this job, + # so a red main does not reach the bucket. + checks: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # 22 to match frontend/Dockerfile, so CI resolves the same tree the + # production image builds from. + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: '22' + + - name: Run checks + run: bash scripts/ci-checks.sh + + deploy: + needs: checks + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # frontend/node_modules is excluded, and that is safe because of what + # happens to this object downstream. CodeDeploy pulls it, extracts to + # /opt/codedeploy-extracted-5, copies the tree to + # /home/ec2-user/utopia-ai-hr-ats-portal-deployment-group and runs + # `docker compose --env-file ./backend/.env up -d --build`. The only Node + # service is the frontend, whose image does `npm ci` from the lockfile, + # and frontend/.dockerignore excludes node_modules/ from the build context + # outright. So the committed tree was carried into every artifact and then + # thrown away unread. It was 90 MB of a 33 MB compressed upload. + # + # node_modules is still tracked in git, which is the reason it was here at + # all. Untracking it is a separate change and affects other branches. + - name: Archive project + run: | + apt-get update -y + apt-get install -y zip + zip -r utopia-ai-hr-ats-portal.zip . \ + -x ".git/*" \ + -x ".gitea/*" \ + -x ".gitignore" \ + -x "frontend/node_modules/*" \ + -x "*.DS_Store" + + - name: Install AWS CLI + run: | + apt-get update -y + apt-get install -y curl unzip + curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" + unzip -q awscliv2.zip + ./aws/install + aws --version + + # The credentials live only on this step. There used to be a separate + # "Configure AWS credentials" step above that set the same three variables + # and then only echoed a message — env: is scoped to its own step, so + # those values were discarded before anything could use them. It was doing + # nothing, and it read as though credentials were set up globally. + - name: Upload files to S3 + env: + AWS_ACCESS_KEY_ID: ${{ secrets.DEVOPS_USER_AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.DEVOPS_USER_AWS_SECRET_ACCESS_KEY }} + AWS_DEFAULT_REGION: us-east-1 + run: | + echo "Uploading repo contents to S3..." + aws s3 cp utopia-ai-hr-ats-portal.zip s3://utopia-ai-s3-repo-bucket/utopia-ai-hr-ats-portal.zip