Skip to content

Instantly share code, notes, and snippets.

@iaincollins
Created February 4, 2020 00:29
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 iaincollins/b8f8c757f26fbbb70ef9859b9e72134c to your computer and use it in GitHub Desktop.
Save iaincollins/b8f8c757f26fbbb70ef9859b9e72134c to your computer and use it in GitHub Desktop.
Example GitHub action to place somewhere like .github/workflows/deploy.yml
name: Deploy on push to master
on:
push:
branches:
- master
jobs:
deploy:
name: deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v1
- name: Install NPM dependencies
run: npm ci
- name: Build application
run: npm run build
- name: Deploy application
run: npm run deploy
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment