From f40f6e7ea683e9399c0bd8e82587616ca908874b Mon Sep 17 00:00:00 2001 From: Carl Tibule Date: Sun, 25 Aug 2024 01:54:58 -0500 Subject: [PATCH] Added Dockerfile and Woodpecker CI definition --- .woodpecker/build.yaml | 22 ++++++++++++++++++++++ Dockerfile | 9 +++++++++ hugo.toml | 2 +- 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 .woodpecker/build.yaml create mode 100644 Dockerfile diff --git a/.woodpecker/build.yaml b/.woodpecker/build.yaml new file mode 100644 index 0000000..dbfbd8c --- /dev/null +++ b/.woodpecker/build.yaml @@ -0,0 +1,22 @@ +when: + - event: push + branch: master +steps: + - name: Determine Image Tag + image: alpine:latest + commands: + - rm -f tags.txt + - echo $(date +"%Y%m%d-%H%M%S") >> tags.txt + - echo "latest" >> tags.txt + - name: Package and Upload Docker Image + image: woodpeckerci/plugin-docker-buildx + settings: + repo: gitea.iwanaga.moe/cjtibule/MyPlaygroundBlog + tags_file: tags.txt + platforms: + - linux/amd64 + username: + from_secret: Gitea_PackageApiUsername + password: + from_secret: Gitea_PackageApiToken + registry: gitea.iwanaga.moe \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c44625e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM alpine:latest +RUN rm -rf ./public/* +RUN apk add --update hugo +RUN hugo + + +FROM nginx:stable-alpine +COPY ./public /usr/share/nginx/html +EXPOSE 80 \ No newline at end of file diff --git a/hugo.toml b/hugo.toml index eef023e..2b0586a 100644 --- a/hugo.toml +++ b/hugo.toml @@ -1,4 +1,4 @@ -baseURL = 'https://myplayground.ctibule.ca/' +baseURL = 'http://localhost' languageCode = 'en-us' title = "Carl's Playground" theme = 'PaperMod'