Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deploy to S3 GitHub Action - #26 #33

Merged
merged 2 commits into from
Aug 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.