adding docker hub publishing
This commit is contained in:
parent
164fee42fc
commit
c5716f0392
30
.github/workflows/docker.yml
vendored
Normal file
30
.github/workflows/docker.yml
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
name: docker
|
||||||
|
|
||||||
|
on:
|
||||||
|
# Runs on pushes targeting the default branch
|
||||||
|
push:
|
||||||
|
branches: ["master"]
|
||||||
|
# Allows you to run this workflow manually from the Actions tab
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
|
- name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build Container
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
push: true
|
||||||
|
tags: sarsoo/sarsooxyz.hugo:latest
|
||||||
|
file: Dockerfile.pub
|
2
.github/workflows/pages.yml
vendored
2
.github/workflows/pages.yml
vendored
@ -30,7 +30,7 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
HUGO_VERSION: 0.99.0
|
HUGO_VERSION: 0.114.1
|
||||||
steps:
|
steps:
|
||||||
- name: Install Hugo CLI
|
- name: Install Hugo CLI
|
||||||
run: |
|
run: |
|
||||||
|
13
Dockerfile.pub
Normal file
13
Dockerfile.pub
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
FROM alpine as build
|
||||||
|
|
||||||
|
RUN apk add hugo
|
||||||
|
|
||||||
|
COPY . /sarsooxyz.hugo
|
||||||
|
WORKDIR /sarsooxyz.hugo
|
||||||
|
|
||||||
|
RUN hugo \
|
||||||
|
--minify \
|
||||||
|
--baseURL https://sarsoo.xyz/
|
||||||
|
|
||||||
|
FROM nginx:alpine-slim
|
||||||
|
COPY --from=build /sarsooxyz.hugo/public /usr/share/nginx/html/
|
Loading…
Reference in New Issue
Block a user