Skip to content

Commit

Permalink
Merge pull request #33 from what-name/dev
Browse files Browse the repository at this point in the history
Add deploy to S3 GitHub Action - #26
  • Loading branch information
what-name authored Aug 6, 2020
2 parents 21a7799 + 5992e17 commit 508d919
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 26 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/s3-cicd-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CICD-dev
on:
push:
branches:
- dev
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- 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: us-east-1

- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 12

- name: Install Gatsby
run: npm install -g gatsby-cli

- name: Build static site
run: npm install
run: gatsby build

- name: Deploy static site to S3 bucket
run: aws s3 sync ./public/ s3://${{ secrets.AWS_DEV_WEBSITE_BUCKET }} --delete
26 changes: 0 additions & 26 deletions buildspec.yaml

This file was deleted.

0 comments on commit 508d919

Please sign in to comment.