diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..f75c44f --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,30 @@ +name: Node.js CI/CD + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: "20" + cache: "npm" + - name: Install dependencies + run: npm install + - name: Run tests + run: npm run test + - name: Run lint + run: npm run lint + - name: Deploy to production + uses: johnbeynon/render-deploy-action@v0.0.8 + with: + service-id: ${{ secrets.RENDER_COM_SERVICE_ID }} + api-key: ${{ secrets.RENDER_COM_API_KEY }}