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 36a2697
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 3 additions & 4 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,7 +23,9 @@ jobs:
extended: true

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

- name: Deploy
uses: appleboy/scp-action@master
Expand Down
3 changes: 1 addition & 2 deletions .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,7 +23,7 @@ jobs:
extended: true

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

- name: Deploy
uses: appleboy/scp-action@master
Expand Down

0 comments on commit 36a2697

Please sign in to comment.