From bfdd58e5b9839e3c895202140d3e55f6b46f10c5 Mon Sep 17 00:00:00 2001 From: Ben Meier Date: Wed, 10 Jul 2024 13:31:12 +0100 Subject: [PATCH] chore: re-added removed files Signed-off-by: Ben Meier --- .github/workflows/release-to-dev.yml | 33 +++++++++++++++++++++++++++ .github/workflows/release-to-prod.yml | 32 ++++++++++++++++++++++++++ Dockerfile | 16 +++++++++++++ 3 files changed, 81 insertions(+) create mode 100644 .github/workflows/release-to-dev.yml create mode 100644 .github/workflows/release-to-prod.yml create mode 100644 Dockerfile diff --git a/.github/workflows/release-to-dev.yml b/.github/workflows/release-to-dev.yml new file mode 100644 index 00000000..292986f5 --- /dev/null +++ b/.github/workflows/release-to-dev.yml @@ -0,0 +1,33 @@ +name: Release to Dev Environment + +on: + push: + branches: [main] + +jobs: + build-and-push: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Build and Push to Humanitec - Github Tag + uses: humanitec/build-push-to-humanitec@v1 + with: + humanitec-token: ${{ secrets.HUMANITEC_TOKEN_HUMANITEC_LABS }} + organization: humanitec-labs + file: Dockerfile + image-name: score-docs + auto-tag: true + + docs-build-and-push: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Build and Push to Humanitec - Github Tag + uses: humanitec/build-push-to-humanitec@v1 + with: + humanitec-token: ${{ secrets.HUMANITEC_TOKEN }} + organization: documentation + file: Dockerfile + image-name: score-docs + auto-tag: true diff --git a/.github/workflows/release-to-prod.yml b/.github/workflows/release-to-prod.yml new file mode 100644 index 00000000..62f7620f --- /dev/null +++ b/.github/workflows/release-to-prod.yml @@ -0,0 +1,32 @@ +name: Release to Production Environment + +on: + release: + types: [released] + +jobs: + build-and-push: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Build and Push to Humanitec - Github Tag + uses: humanitec/build-push-to-humanitec@v1 + with: + humanitec-token: ${{ secrets.HUMANITEC_TOKEN_HUMANITEC_LABS }} + organization: humanitec-labs + file: Dockerfile + image-name: score-docs + auto-tag: true + + docs-build-and-push: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Build and Push to Humanitec - Github Tag + uses: humanitec/build-push-to-humanitec@v1 + with: + humanitec-token: ${{ secrets.HUMANITEC_TOKEN }} + organization: documentation + file: Dockerfile + image-name: score-docs + auto-tag: true diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..c691f39b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +# We use golang because hugo depends on Go as it's module downloader +FROM golang:alpine +# We then install shared libs and dynamic linking dependencies +RUN apk add --no-cache gcc g++ musl-dev git yarn gcompat npm + +COPY . /src +WORKDIR /src + +# Install all the packages +RUN yarn install + +# Do an initial hugo build +RUN yarn hugo --verbose + +# Run the hugo server at launch +CMD [ "yarn", "hugo", "server", "--themesDir", "../..", "--disableFastRender", "--renderToMemory", "--bind", "0.0.0.0" ]