From 72a735a6ca2343dbb2044a14c98b948b2b11ccfc Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Wed, 6 Mar 2024 23:17:20 +0000 Subject: [PATCH 1/2] chore: add test workflow that runs hugo build (#31) * Add test workflow that runs hugo build * Use devbox action v0.8.0 --- .github/workflows/deploy.yml | 21 +++++++++------------ .github/workflows/test.yml | 21 +++++++++++++++++++++ .gitignore | 3 ++- devbox.json | 10 ++++++++++ 4 files changed, 42 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/test.yml create mode 100644 devbox.json diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 727aea6..f34f0f1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -28,29 +28,26 @@ jobs: env: HUGO_VERSION: 0.121.1 steps: - - name: Install Hugo CLI - run: | - wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ - && sudo dpkg -i ${{ runner.temp }}/hugo.deb - - - name: Install Dart Sass Embedded - run: sudo snap install dart-sass-embedded - - name: Checkout uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 + - name: Install devbox + uses: jetpack-io/devbox-install-action@v0.8.0 + with: + enable-cache: true + - name: Setup Pages id: pages uses: actions/configure-pages@1f0c5cde4bc74cd7e1254d0cb4de8d49e9068c7d # v4 - - name: Build with Hugo + - name: Build env: HUGO_ENVIRONMENT: production HUGO_ENV: production run: | - hugo \ - --minify \ - --baseURL "${{ steps.pages.outputs.base_url }}/" + devbox run -- hugo \ + --baseURL "${{ steps.pages.outputs.base_url }}/" \ + --minify - name: Upload artifact uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..0ade7fb --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,21 @@ +name: Test + +on: + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Install devbox + uses: jetpack-io/devbox-install-action@v0.8.0 + with: + enable-cache: true + + - name: Build + run: devbox run -- hugo diff --git a/.gitignore b/.gitignore index 6767b78..407bd3a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ -# IDEs +# Development Tools .vscode/ .idea/ +devbox.lock # Build outputs public/ diff --git a/devbox.json b/devbox.json new file mode 100644 index 0000000..6c6b3b7 --- /dev/null +++ b/devbox.json @@ -0,0 +1,10 @@ +{ + "packages": ["hugo@0.123.6"], + "shell": { + "scripts": { + "dev": [ + "hugo server" + ] + } + } +} From 73154516300c4ea8778c4dfbd51b35bff64411ef Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 6 Mar 2024 23:17:35 +0000 Subject: [PATCH 2/2] chore(deps): pin dependencies (#32) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/deploy.yml | 2 +- .github/workflows/test.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f34f0f1..b8d99c8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -32,7 +32,7 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - name: Install devbox - uses: jetpack-io/devbox-install-action@v0.8.0 + uses: jetpack-io/devbox-install-action@4a7f1d5332cc72057d5e8080edebfcdf652e642e # v0.8.0 with: enable-cache: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0ade7fb..5694cf2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,10 +10,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2 - name: Install devbox - uses: jetpack-io/devbox-install-action@v0.8.0 + uses: jetpack-io/devbox-install-action@4a7f1d5332cc72057d5e8080edebfcdf652e642e # v0.8.0 with: enable-cache: true