reverted changes for environment variable
All checks were successful
Build and Deploy Hugo Site / buildAndDeploy (push) Successful in 1m41s
All checks were successful
Build and Deploy Hugo Site / buildAndDeploy (push) Successful in 1m41s
This commit is contained in:
parent
c87fb11971
commit
eeae6bc997
3 changed files with 7 additions and 3 deletions
|
|
@ -15,8 +15,8 @@ jobs:
|
||||||
uses: SebRollen/toml-action@v1.2.0
|
uses: SebRollen/toml-action@v1.2.0
|
||||||
id: read_toml
|
id: read_toml
|
||||||
with:
|
with:
|
||||||
file: './config/_default/params.toml'
|
file: 'hugo.toml'
|
||||||
field: 'environment'
|
field: 'params.environment'
|
||||||
|
|
||||||
- name: Echo environment
|
- name: Echo environment
|
||||||
run: echo "Environment is ${{ steps.read_toml.outputs.value }}"
|
run: echo "Environment is ${{ steps.read_toml.outputs.value }}"
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,10 @@ disableLanguages = ["en"]
|
||||||
hasCJKLanguage = false # If hasCJKLanguage true, auto-detect Chinese/Japanese/Korean Languages in the content. see: https://gohugo.io/getting-started/configuration/#hascjklanguage
|
hasCJKLanguage = false # If hasCJKLanguage true, auto-detect Chinese/Japanese/Korean Languages in the content. see: https://gohugo.io/getting-started/configuration/#hascjklanguage
|
||||||
enableRobotsTXT = true
|
enableRobotsTXT = true
|
||||||
|
|
||||||
|
########################### Deployment #############################
|
||||||
|
# set to "development" or "production". This deploys the site to the correct environment and sets the robot.txt to disallow all pages when in development mode.
|
||||||
|
[params]
|
||||||
|
environment = "development"
|
||||||
|
|
||||||
########################### Services #############################
|
########################### Services #############################
|
||||||
[services]
|
[services]
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ git push -u origin main
|
||||||
|
|
||||||
Deployment is done via Gitea Runners. The deployment is triggered by a push to the `main` branch. The deployment will automatically build the site and deploy it to the production or preview environment.
|
Deployment is done via Gitea Runners. The deployment is triggered by a push to the `main` branch. The deployment will automatically build the site and deploy it to the production or preview environment.
|
||||||
|
|
||||||
You can control where the site is deployed by setting the 'params.environment' variable in the `hugo.toml` file. The value should be either `production` or `development`.
|
You can control where the site is deployed by setting the 'environment' variable in the `hugo.toml` file. The value should be either `production` or `development`.
|
||||||
|
|
||||||
This also controls the creation of the robots.txt file. If the value is `development`, the robots.txt file will be created with the following content:
|
This also controls the creation of the robots.txt file. If the value is `development`, the robots.txt file will be created with the following content:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue