From bd17c75c2b5502fb9ba4b5a32f1e1ed9c85c6f57 Mon Sep 17 00:00:00 2001 From: Matteias Collet Date: Mon, 29 Jun 2020 23:38:43 +0200 Subject: [PATCH] update github workflows --- .github/workflows/build.yml | 17 +++++++++++++++++ .github/workflows/{default.yml => deploy.yml} | 16 ++++++---------- 2 files changed, 23 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/build.yml rename .github/workflows/{default.yml => deploy.yml} (89%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..55e0c56 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,17 @@ +name: Build Project + +on: + push: + branches: + - '*' + - '!gh-pages' + - '!master' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v1 + - name: Create a new build + run: docker build -t publisher:latest -f ./dockerfiles/Deploy.Dockerfile . diff --git a/.github/workflows/default.yml b/.github/workflows/deploy.yml similarity index 89% rename from .github/workflows/default.yml rename to .github/workflows/deploy.yml index 9c5b279..4b081ec 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/deploy.yml @@ -1,24 +1,20 @@ -name: CI/CD +name: Build & Deploy on: push: branches: - - '*' - - '!gh-pages' + - 'master' jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v1 - - name: Create a new build - run: docker build -t publisher:latest -f ./dockerfiles/Deploy.Dockerfile . deploy: runs-on: ubuntu-latest needs: build if: github.ref == 'refs/heads/master' steps: + - name: Checkout + uses: actions/checkout@v1 + - name: Create a new build + run: docker build -t publisher:latest -f ./dockerfiles/Deploy.Dockerfile . - name: Deploy to gh-pages branch env: REPOSITORY_TOKEN: ${{ secrets.REPOSITORY_TOKEN }}