From 6190e5a0981ff7fbbd0ff84ed514f3b8a11ede7d Mon Sep 17 00:00:00 2001 From: Vitaliy Potyarkin Date: Wed, 28 Aug 2024 13:48:01 +0300 Subject: [PATCH] [#25] Build the site with Forgejo Actions Signed-off-by: Vitaliy Potyarkin --- .forgejo/workflows/build.yml | 44 ++++++++++++++++++++++++++++++++++++ .gitmodules | 2 +- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 .forgejo/workflows/build.yml diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml new file mode 100644 index 0000000..772733b --- /dev/null +++ b/.forgejo/workflows/build.yml @@ -0,0 +1,44 @@ +name: build static site + +on: + workflow_dispatch: + push: + pull_request: + +jobs: + build: + container: + image: node:22-bookworm + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - uses: actions/cache@v4 + with: + path: |- + bin/ + themes/ + key: hugo-${{ runner.os }}-${{ hashFiles('Makefile', 'config.toml') }} + restore-keys: | + hugo-${{ runner.os }} + hugo + + - name: make all + run: | + git submodule sync + rm -rf themes/dot-hugo + make all + + - uses: https://code.forgejo.org/forgejo/upload-artifact@v4 + id: artifact-upload-step + with: + name: site + path: | + public/ + if-no-files-found: error + retention-days: 10 + + - name: Show artifact URL + run: | + echo 'Download URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/${{ steps.artifact-upload-step.outputs.artifact-id }}' diff --git a/.gitmodules b/.gitmodules index 485c06e..5018fe7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "themes/dot-hugo"] path = themes/dot-hugo - url = git@git.frostfs.info:TrueCloudLab/dot-hugo.git + url = https://git.frostfs.info/TrueCloudLab/dot-hugo branch = frostfs_design_version