Created
April 5, 2020 12:02
-
-
Save valstu/49d3e60633d1e993794b86fa8771d366 to your computer and use it in GitHub Desktop.
Github Actions yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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