Skip to content

Commit

Permalink
Merge pull request #14 from open-source-labs/gitHubActionsInit
Browse files Browse the repository at this point in the history
Git hub actions init
  • Loading branch information
troutman21 committed Oct 18, 2023
2 parents 9853e33 + dd64503 commit 06212e8
Showing 1 changed file with 32 additions and 24 deletions.
56 changes: 32 additions & 24 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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 }}"

0 comments on commit 06212e8

Please sign in to comment.