Last active
December 15, 2020 20:59
-
-
Save dabit3/f817ccd90bee90617b57c02aa15c20fa to your computer and use it in GitHub Desktop.
GitHub action for Next.js Serverless Component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .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