Skip to content
Merged
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
60 changes: 60 additions & 0 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Production deployment

on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: npm install and build webpack
run: |
npm install
npm run build
- uses: actions/upload-artifact@master
with:
name: webpack artifacts
path: public/

deploy:
name: Deploy Node.js app to AWS
needs: build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- name: Download built artifact
uses: actions/download-artifact@master
with:
name: webpack artifacts
path: public

- name: Deploy to AWS
uses: docker://admiralawkbar/aws-nodejs:latest
env:
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }}

Build-and-Push-Docker-Image:
runs-on: ubuntu-latest
needs: build
name: Docker Build, Tag, Push
steps:
- name: Checkout
uses: actions/checkout@v1

- name: Download built artifact
uses: actions/download-artifact@master
with:
name: webpack artifacts
path: public

- name: Build, Tag, Push
uses: mattdavis0351/actions/docker-gpr@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
image-name: tic-tac-toe