Skip to content

Commit

Permalink
Change hugo env to prod and simplify github run conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
noxilixon committed Nov 28, 2023
1 parent c9373eb commit 4c754d3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ on:
push:
branches-ignore:
- main
pull_request:
branches-ignore:
- main

jobs:
deploy:
Expand All @@ -26,8 +23,13 @@ jobs:
extended: true

- name: Build
env:
HUGO_ENV: production
run: hugo --minify -b $URL_DEVELOPMENT/$GITHUB_REF_NAME --destination branch/$GITHUB_REF_NAME

- name: Create robots.txt
run: 'echo -e "User-agent: *\nDisallow: /\nSitemap: /sitemap.xml" > branch/robots.txt'

- name: Deploy
uses: appleboy/scp-action@master
with:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- main
pull_request:

jobs:
deploy:
Expand All @@ -24,6 +23,8 @@ jobs:
extended: true

- name: Build
env:
HUGO_ENV: production
run: hugo --minify -b $URL_PRODUCTION

- name: Deploy
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ hugo build --minify -b <DOMAIN>

The website is deployed automatically via github actions. The main branch is at [berlin.freifunk.net](https://berlin.freifunk.net). The other branches could be accessed via `dev.berlin.freifunk.net/<BRANCH_NAME>/`.

The actions are defined in `.github/workflows` and could be configured with [github variables and secrets](https://github.com/freifunk-berlin/berlin.freifunk.net/settings/secrets/actions). The configurations for the production and development webserver are in the `apache` directory. The development setup should also use the `robots.txt` file to deny indexing.
The actions are defined in `.github/workflows` and could be configured with [github variables and secrets](https://github.com/freifunk-berlin/berlin.freifunk.net/settings/secrets/actions). The configurations for the production and development webserver are in the `apache` directory.
2 changes: 0 additions & 2 deletions apache/robots.txt

This file was deleted.

0 comments on commit 4c754d3

Please sign in to comment.