Skip to content

Instantly share code, notes, and snippets.

@dabit3
Last active December 15, 2020 20:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dabit3/f817ccd90bee90617b57c02aa15c20fa to your computer and use it in GitHub Desktop.
Save dabit3/f817ccd90bee90617b57c02aa15c20fa to your computer and use it in GitHub Desktop.
GitHub action for Next.js Serverless Component
# .github/workflows/main.yml
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Install NPM dependencies
run: npm install
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET }}
aws-region: us-east-1
- name: Deploy Next.js app
run: npx serverless
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment