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:
parent
6ea49bd0db
commit
11604f73b7
14
.github/workflows/ci.yml
vendored
14
.github/workflows/ci.yml
vendored
@ -1,6 +1,6 @@
|
|||||||
name: 'CI/CD Pipeline'
|
name: 'CI/CD Pipeline'
|
||||||
|
|
||||||
on: [push]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
@ -57,3 +57,15 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: public
|
name: public
|
||||||
path: 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
|
||||||
|
@ -63,14 +63,14 @@ function ping {
|
|||||||
##
|
##
|
||||||
## check for pull request against master
|
## 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
|
s3sync $AWS_S3_BUCKET_BETA
|
||||||
|
|
||||||
##
|
##
|
||||||
## check for master push which is no pull request
|
## 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
|
s3sync $AWS_S3_BUCKET
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user