add docker deploy step to github workflows (#1321)

Signed-off-by: Matthew Peveler <matt.peveler@gmail.com>
This commit is contained in:
Matthew Peveler
2020-10-27 20:42:44 +02:00
committed by GitHub
parent 779658de7b
commit 0e242e323b
2 changed files with 30 additions and 0 deletions

View File

@@ -33,6 +33,14 @@ jobs:
- run: bundle exec middleman build
- name: Push to Docker Hub
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_KEY }}
repository: slatedocs/slate
tag_with_ref: true
- name: Deploy
uses: peaceiris/actions-gh-pages@v3.7.0-8
with:

22
.github/workflows/publish.yml vendored Normal file
View File

@@ -0,0 +1,22 @@
name: Publish Docker image
on:
release:
types: [published]
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Push to Docker Hub
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_KEY }}
repository: slatedocs/slate
tag_with_ref: true
tags: latest