Skip to content

Commit

Permalink
fix: Reinstate webserver build on push
Browse files Browse the repository at this point in the history
  • Loading branch information
macite committed Jun 5, 2021
1 parent 370ed89 commit 70d125d
Showing 1 changed file with 48 additions and 45 deletions.
93 changes: 48 additions & 45 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,51 +6,54 @@ on:
tags:
- 'v*.*.*'
jobs:
# docker-webserver:
# environment: deployment-secrets
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v2
# - name: Checkout submodules
# run: git submodule update --init --recursive
# - name: Build local webserver container
# uses: docker/build-push-action@v2
# with:
# context: ./doubtfire-web
# push: false
# tags: doubtfire-web:latest
# - name: Build web application
# uses: addnab/docker-run-action@v3
# with:
# image: doubtfire-web:latest
# options: -v ${{ github.workspace }}/doubtfire-web:/doubtfire-web --workdir /doubtfire-web
# run: |
# echo "Running Script"
# npm install
# npm run-script deploy
# - name: Login to DockerHub
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# - name: Setup meta for webserver
# id: docker_meta
# uses: docker/metadata-action@v3
# with:
# images: lmsdoubtfire/webserver
# tag-custom: latest
# tag-semver: |
# {{raw}}
# - name: Build and push webserver
# id: docker_build
# uses: docker/build-push-action@v2
# with:
# file: webserver.Dockerfile
# push: true
# tags: ${{ steps.docker_meta.outputs.tags }}
# - name: Image digest
# run: echo ${{ steps.docker_build.outputs.digest }}
docker-webserver:
environment: deployment-secrets
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: true
- name: Build local webserver container
uses: docker/build-push-action@v2
with:
context: ./doubtfire-web
push: false
load: true
tags: doubtfire-web:latest
- name: Build web application
run: docker run -v ${{ github.workspace }}/doubtfire-web:/doubtfire-web -v ${{ github.workspace }}/doubtfire-web/dist:/doubtfire-web/dist --workdir /doubtfire-web doubtfire-web:latest npm run-script deploy
# - name: Build web application
# uses: addnab/docker-run-action@v3
# with:
# image: doubtfire-web:latest
# options: -v ${{ github.workspace }}/doubtfire-web:/doubtfire-web -v ${{ github.workspace }}/doubtfire-web/dist:/doubtfire-web/dist --workdir /doubtfire-web
# run: |
# echo "Running Script"
# npm install
# npm run-script deploy
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Setup meta for webserver
id: docker_meta
uses: docker/metadata-action@v3
with:
images: lmsdoubtfire/webserver
tag-custom: latest
tag-semver: |
{{raw}}
- name: Build and push webserver
id: docker_build
uses: docker/build-push-action@v2
with:
file: webserver.Dockerfile
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
docker-pdfGen:
environment: deployment-secrets
runs-on: ubuntu-latest
Expand Down

0 comments on commit 70d125d

Please sign in to comment.