Skip to content

Instantly share code, notes, and snippets.

@valstu
Created April 5, 2020 12:02
Show Gist options
  • Save valstu/49d3e60633d1e993794b86fa8771d366 to your computer and use it in GitHub Desktop.
Save valstu/49d3e60633d1e993794b86fa8771d366 to your computer and use it in GitHub Desktop.
Github Actions yaml
name: CI
on:
pull_request:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@master
- name: Use Node.js 10.x
uses: actions/setup-node@v1
with:
version: 10.x
- name: Build
run: |
npm install
npm run build --if-present
- name: Deploy
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
env:
AWS_DEFAULT_REGION: eu-central-1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET }}
run: node ./scripts/deploy.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment