diff --git a/exampleSite/.gitlab-ci.yml b/exampleSite/.gitlab-ci.yml new file mode 100644 index 0000000..fa5e96a --- /dev/null +++ b/exampleSite/.gitlab-ci.yml @@ -0,0 +1,47 @@ +stages: + - build + +variables: + HUGO_ENV: production + HUGO_VERSION: "0.114.0" + GO_VERSION: "1.16.3" + NODE_VERSION: "18.15.0" + +cache: + paths: + - node_modules/ + +default: + image: node:${NODE_VERSION} + before_script: + - echo "USING NODE ${NODE_VERSION}" + - apt-get update && apt-get install -y curl + - curl -LO "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz" + - tar -xvf hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz + - mv hugo /usr/local/bin/ + - rm hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz + - echo "HUGO ${HUGO_VERSION} INSTALLED" + - curl -LO "https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz" + - tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz + - export PATH=$PATH:/usr/local/go/bin + - rm go${GO_VERSION}.linux-amd64.tar.gz + - echo "GO ${GO_VERSION} INSTALLED" + - npm install + +test: + stage: build + script: + - npm run build + rules: + - if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH + +pages: + stage: build + script: + - npm run build + - echo "SITE BUILT SUCCESSFULLY! LIVE AT https://$GITLAB_USER_LOGIN.gitlab.io/$CI_PROJECT_NAME/" + artifacts: + paths: + - public + rules: + - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH diff --git a/exampleSite/package.json b/exampleSite/package.json index 9500b2e..e884a21 100644 --- a/exampleSite/package.json +++ b/exampleSite/package.json @@ -1,13 +1,13 @@ { "name": "hugoplate", "description": "hugo tailwindcss boilerplate", - "version": "1.0.0", + "version": "1.1.1", "license": "MIT", "author": "zeon.studio", "scripts": { - "dev": "cd exampleSite; hugo server 2> /dev/null || hugo server --themesDir ../..", - "test": "cd exampleSite; hugo server --disableFastRender --navigateToChanged --templateMetrics --templateMetricsHints --verbose --verboseLog --buildDrafts --buildExpired --buildFuture --watch --forceSyncStatic -e production --minify 2> /dev/null || hugo server --themesDir ../.. --disableFastRender --navigateToChanged --templateMetrics --templateMetricsHints --verbose --verboseLog --buildDrafts --buildExpired --buildFuture --watch --forceSyncStatic -e production --minify", - "build": "cd exampleSite; hugo --gc --minify --templateMetrics --templateMetricsHints --verbose --verboseLog --buildDrafts --buildExpired --buildFuture --forceSyncStatic 2> /dev/null || hugo --themesDir ../.. --gc --minify --templateMetrics --templateMetricsHints --verbose --verboseLog --buildDrafts --buildExpired --buildFuture --forceSyncStatic", + "dev": "cd exampleSite; hugo server || hugo server --themesDir ../..", + "test": "cd exampleSite; hugo server --disableFastRender --navigateToChanged --templateMetrics --templateMetricsHints --buildDrafts --buildExpired --buildFuture --watch --forceSyncStatic -e production --minify || hugo server --themesDir ../.. --disableFastRender --navigateToChanged --templateMetrics --templateMetricsHints --buildDrafts --buildExpired --buildFuture --watch --forceSyncStatic -e production --minify", + "build": "cd exampleSite; hugo --gc --minify --templateMetrics --templateMetricsHints --buildDrafts --buildExpired --buildFuture --forceSyncStatic || hugo --themesDir ../.. --gc --minify --templateMetrics --templateMetricsHints --buildDrafts --buildExpired --buildFuture --forceSyncStatic", "update-modules": "hugo mod clean && hugo mod get -u ./... && hugo mod tidy", "format": "prettier -w .", "remove-darkmode": "node ./scripts/removeDarkmode.js && yarn format" @@ -17,7 +17,7 @@ "@tailwindcss/forms": "^0.5.3", "@tailwindcss/typography": "^0.5.9", "autoprefixer": "^10.4.14", - "postcss": "^8.4.23", + "postcss": "^8.4.24", "postcss-cli": "^10.1.0", "prettier": "^2.8.8", "prettier-plugin-go-template": "0.0.13", diff --git a/package.json b/package.json index 5727d00..e884a21 100644 --- a/package.json +++ b/package.json @@ -5,9 +5,9 @@ "license": "MIT", "author": "zeon.studio", "scripts": { - "dev": "cd exampleSite; hugo server 2> /dev/null || hugo server --themesDir ../..", - "test": "cd exampleSite; hugo server --disableFastRender --navigateToChanged --templateMetrics --templateMetricsHints --verbose --verboseLog --buildDrafts --buildExpired --buildFuture --watch --forceSyncStatic -e production --minify 2> /dev/null || hugo server --themesDir ../.. --disableFastRender --navigateToChanged --templateMetrics --templateMetricsHints --verbose --verboseLog --buildDrafts --buildExpired --buildFuture --watch --forceSyncStatic -e production --minify", - "build": "cd exampleSite; hugo --gc --minify --templateMetrics --templateMetricsHints --verbose --verboseLog --buildDrafts --buildExpired --buildFuture --forceSyncStatic 2> /dev/null || hugo --themesDir ../.. --gc --minify --templateMetrics --templateMetricsHints --verbose --verboseLog --buildDrafts --buildExpired --buildFuture --forceSyncStatic", + "dev": "cd exampleSite; hugo server || hugo server --themesDir ../..", + "test": "cd exampleSite; hugo server --disableFastRender --navigateToChanged --templateMetrics --templateMetricsHints --buildDrafts --buildExpired --buildFuture --watch --forceSyncStatic -e production --minify || hugo server --themesDir ../.. --disableFastRender --navigateToChanged --templateMetrics --templateMetricsHints --buildDrafts --buildExpired --buildFuture --watch --forceSyncStatic -e production --minify", + "build": "cd exampleSite; hugo --gc --minify --templateMetrics --templateMetricsHints --buildDrafts --buildExpired --buildFuture --forceSyncStatic || hugo --themesDir ../.. --gc --minify --templateMetrics --templateMetricsHints --buildDrafts --buildExpired --buildFuture --forceSyncStatic", "update-modules": "hugo mod clean && hugo mod get -u ./... && hugo mod tidy", "format": "prettier -w .", "remove-darkmode": "node ./scripts/removeDarkmode.js && yarn format"