1
0
mirror of https://github.com/kremalicious/portfolio.git synced 2024-11-15 01:25:25 +01:00

add deploy step

This commit is contained in:
Matthias Kretschmann 2019-11-26 01:45:27 +01:00
parent 6ea49bd0db
commit 11604f73b7
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 15 additions and 3 deletions

View File

@ -1,6 +1,6 @@
name: 'CI/CD Pipeline'
on: [push]
on: [push, pull_request]
jobs:
test:
@ -57,3 +57,15 @@ jobs:
with:
name: public
path: public
deploy:
needs: build
if: github.event_name == 'pull_request' || github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/download-artifact@v1
with:
name: public
- run: ./scripts/deploy.sh

View File

@ -63,14 +63,14 @@ function ping {
##
## check for pull request against master
##
if [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then
if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then
s3sync $AWS_S3_BUCKET_BETA
##
## check for master push which is no pull request
##
elif [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] || [ "$TRAVIS" != true ]; then
elif [ "$GITHUB_REF" == "refs/heads/master" ]; then
s3sync $AWS_S3_BUCKET