diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000000..5290f8969fa --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,44 @@ +name: Build and Deploy + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: 14 + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + deploy: + needs: build + runs-on: ubuntu-latest + + steps: + - name: Deploy to staging + uses: some-deployment-action@v1 + with: + environment: staging + api-key: ${{ secrets.STAGING_API_KEY }} + region: us-west + + - name: Deploy to production + uses: some-deployment-action@v1 + with: + environment: production + api-key: ${{ secrets.PRODUCTION_API_KEY }} + region: us-east