diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index bbcff5e..db1eda1 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -10,38 +10,47 @@ jobs: runs-on: ubuntu-latest steps: - - # checks out repo into the VM - - name: Checkout + - name: checkout repo uses: actions/checkout@v4 - # install Node (not sure if this is needed yet) - - name: Node Install + - name: node install uses: actions/setup-node@v3 with: node-version: '18' - # Run NPM Install? - - name: Install Dependencies and Build - run: | - npm install - npm run build - - # Run NPM Build? + - name: install npm dependencies + run: npm install + + - name: Build Website Assets + run: npm run build - # create zip file to be stored in amazon s3 bucket - - name: Create ZIP Deployment Package - run: zip -r deploy_package_fromAction.zip .next pages public styles *.json *.js *.ts + - name: create zip deployment package + run: zip -r deploy_package3.zip .next pages public styles *.json *.js *.ts - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 + - name: Deploy to EB + uses: einaregilsson/beanstalk-deploy@v21 with: - aws-access-key-id: ${{ secrets.ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.SECRET_ACCESS_KEY }} - aws-region: "us-west-1" + aws_access_key: ${{ secrets.ACCESS_KEY_ID }} + aws_secret_key: ${{ secrets.SECRET_ACCESS_KEY }} + application_name: SeeQR-Website + environment_name: SeeQR-Website-env + version_label: "ver-${{ github.sha }}" + region: us-west-1 + deployment_package: deploy_package3.zip + + + + # - name: configure aws credentials + # uses: aws-actions/configure-aws-credentials@v4 + # with: + # aws-access-key-id: ${{ secrets.ACCESS_KEY_ID }} + # aws-secret-access-key: ${{ secrets.SECRET_ACCESS_KEY }} + # aws-region: "us-west-1" + + # - name: upload deployment package to s3 bucket + # run: aws s3 cp deploy_package_fromAction.zip s3://seeqr-splash-page-deploy/ + - - name: Upload Package to S3 Bucket - run: aws s3 cp deploy_package_fromAction.zip s3://seeqr-splash-page-deploy/ # - name: Create new ElasticBeanstalk Application Version # run: | @@ -52,5 +61,4 @@ jobs: # --description "commit-sha-${{ github.sha }}" # - name: Deploy New ElasticBeanstalk Application Version - # run: aws elasticbeanstalk update-environment --environment-name SeeQR-Website-env --version-label "ver-${{ github.sha }}" - + # run: aws elasticbeanstalk update-environment --environment-name SeeQR-Website-env --version-label "ver-${{ github.sha }}" \ No newline at end of file