Multiple tasks for uploading files and building not working?

Hi!

For some reason i am not able to create multiple JOBS inside my CircleCI configuration. Struggling with this issue for 3 hours now.

I want to run multiple jobs one to build my package using the Node image and second step to upload all the files using SFTP.

But i am just unable to make this work.

Can someone help?

config.yml:

version: 2
jobs:
  build:
    docker:
      - image: circleci/node:10.16

    working_directory: ~/repo

    branches:
          only:
            - develop

    steps:
      - checkout

      # Download and cache dependencies
      - restore_cache:
          keys:
            - v1-dependencies-{{ checksum "package.json" }}
            # fallback to using the latest cache if no exact match is found
            - v1-dependencies-

      - run: yarn install

      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "package.json" }}
          
      # run tests!
      - run: yarn test-build
  test:
    machine:
      - image: circleci/classic:latest

    steps:
      - run:
          name: Install LFTP
          command: |
            sudo apt-get update;
            sudo apt-get install lftp;
      - checkout
      - run:
          name: uploading files using SFTP
          command: lftp sftp://${username}:${password}@${hostname} -e "mirror -v -R --exclude src/ --exclude webpack/ --exclude .babelrc --exclude .browserslistrc --exclude .eslintrc --exclude .gitignore --exclude .prettierrc --exclude .stylelintignore --exclude .stylelintrc --exclude bitbucket-pipelines.yml --exclude env.json --exclude yarn.lock  --exclude .git/ --exclude .circleci/ ./ ${site_name}/wp-content/themes/${theme}; quit"
workflows:
  version: 2
  build_and_test:
    jobs:
      - build
      - test