diff --git a/.github/workflows/nodejs-hello-world.yml b/.github/workflows/nodejs-hello-world.yml new file mode 100644 index 000000000..1163d445b --- /dev/null +++ b/.github/workflows/nodejs-hello-world.yml @@ -0,0 +1,38 @@ +name: Node.js Hello World CI + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' + + - name: Install dependencies + run: npm install + + - name: Run the app + run: node index.js & + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ vars.AWS_REGION }} + - name: Sync build to S3 + run: + aws s3 sync . s3://maazprac