Skip to content

Commit

Permalink
draft pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Kariton committed Jul 30, 2024
1 parent 6ba5870 commit 5f0bb64
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/build-hugo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: Hugo build

on:
push:
branches: ["main"]
branches:
- main
- draft
paths:
- '.github/**'
- 'assets/**'
Expand All @@ -19,7 +21,7 @@ on:
workflow_dispatch:

concurrency:
group: "hugo"
group: "hugo-${{ github.ref_name }}"
cancel-in-progress: true

defaults:
Expand Down Expand Up @@ -49,9 +51,9 @@ jobs:
uses: actions/cache@v3
with:
path: .git/lfs/objects
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}
key: ${{ runner.os }}-lfs-${{ github.ref_name }}-${{ hashFiles('.lfs-assets-id') }}
restore-keys: |
${{ runner.os }}-lfs
${{ runner.os }}-lfs-${{ github.ref_name }}
- name: Git LFS Pull
run: git lfs pull
Expand All @@ -60,15 +62,15 @@ jobs:
uses: actions/cache@v3
with:
path: resources
key: ${{ runner.os }}-hugo-resources-directory-${{ github.run_id }}
key: ${{ runner.os }}-hugo-resources-directory-${{ github.ref_name }}-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-hugo-resources-directory
${{ runner.os }}-hugo-resources-directory-${{ github.ref_name }}
- name: Build with Hugo
env:
HUGO_ENVIRONMENT: ${{ github.ref_name == 'main' && 'production' || 'development' }}
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production
HUGO_ENV: production
HUGO_ENV: ${{ github.ref_name == 'main' && 'production' || 'development' }}
run: |
hugo \
--gc \
Expand All @@ -80,6 +82,6 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: public
name: ${{ github.ref_name }}-public
path: ./public
if-no-files-found: error
2 changes: 1 addition & 1 deletion .github/workflows/deploy-hetzner_webhost.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
with:
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
name: public
name: ${{ github.ref_name }}-public
path: ./public

- name: Set up SSH key
Expand Down
2 changes: 1 addition & 1 deletion config/development/hugo.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
title: Jaspers IT DEV
title: Jaspers IT DRAFT

0 comments on commit 5f0bb64

Please sign in to comment.