-
Notifications
You must be signed in to change notification settings - Fork 4
23 lines (23 loc) · 990 Bytes
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
name: deploy
on:
push:
branches:
- master
- stage
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- run: zip -9 -x .git/\* -x .github/\* -x .gitignore -x build.js -x README.md -r sabbath-school-reader-latest.zip .
- run: curl https://s3.amazonaws.com/aws-cli/awscli-bundle.zip -o awscli-bundle.zip
- run: unzip awscli-bundle.zip
- run: ./awscli-bundle/install -b ~/bin/aws
- run: aws s3 cp sabbath-school-reader-latest.zip s3://sabbath-school`[[ "${{ steps.extract_branch.outputs.branch }}" = "stage" ]] && echo '-stage'`.adventech.io/reader/ --acl "public-read" --region us-east-1 --no-progress
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}