diff --git a/.github/workflows/helloCICD.yml b/.github/workflows/helloCICD.yml index 45649b5..9b72e4d 100644 --- a/.github/workflows/helloCICD.yml +++ b/.github/workflows/helloCICD.yml @@ -38,3 +38,22 @@ jobs: with: name: build path: cicd_app/www + + deploy: + name: DockerHub Deployment + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Download build artifacts + uses: actions/download-artifact@v1 + with: + name: build + + - name: Publish to Registry + uses: elgohr/Publish-Docker-Github-Action@master + with: + name: sourcefrog/cicd + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..082dfff --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM nginx:1.19.2-alpine + +COPY ./build/ /usr/share/nginx/html \ No newline at end of file