diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml new file mode 100644 index 0000000..c06fea4 --- /dev/null +++ b/.forgejo/workflows/ci.yml @@ -0,0 +1,26 @@ +on: [push, pull_request] + +name: Homepage deployment + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: "^1.23.3" + - name: Setup Minio Client + run: wget https://dl.min.io/client/mc/release/linux-amd64/mc && chmod +x mc && cp mc /usr/local/bin + - name: Clone repository + uses: actions/checkout@v4 + - name: Setup Hugo + uses: https://github.com/peaceiris/actions-hugo@v3 + with: + hugo-version: "0.139.3" + - name: Build + run: hugo --minify + - name: Add Minio credentials + run: mc alias set deploy "${{ vars.MINIO_ENDPOINT }}" "${{ secrets.MINIO_ACCESS_KEY }}" "${{ secrets.MINIO_SECRET_KEY }}" + - name: Deploy + run: mc mirror --overwrite ./public deploy/homepage-source diff --git a/.gitignore b/.gitignore index fd28df8..ba20f71 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,16 @@ .env .direnv/ + +# Generated files by hugo +/public/ +/resources/_gen/ +/assets/jsconfig.json +hugo_stats.json + +# Executable may be added to repository +hugo.exe +hugo.darwin +hugo.linux + +# Temporary lock file while building +/.hugo_build.lock diff --git a/hugo/archetypes/default.md b/archetypes/default.md similarity index 100% rename from hugo/archetypes/default.md rename to archetypes/default.md diff --git a/hugo/config/_default/hugo.toml b/config/_default/hugo.toml similarity index 100% rename from hugo/config/_default/hugo.toml rename to config/_default/hugo.toml diff --git a/hugo/config/_default/languages.en.toml b/config/_default/languages.en.toml similarity index 100% rename from hugo/config/_default/languages.en.toml rename to config/_default/languages.en.toml diff --git a/hugo/config/_default/markup.toml b/config/_default/markup.toml similarity index 100% rename from hugo/config/_default/markup.toml rename to config/_default/markup.toml diff --git a/hugo/config/_default/menus.en.toml b/config/_default/menus.en.toml similarity index 100% rename from hugo/config/_default/menus.en.toml rename to config/_default/menus.en.toml diff --git a/hugo/config/_default/module.toml b/config/_default/module.toml similarity index 100% rename from hugo/config/_default/module.toml rename to config/_default/module.toml diff --git a/hugo/config/_default/params.toml b/config/_default/params.toml similarity index 100% rename from hugo/config/_default/params.toml rename to config/_default/params.toml diff --git a/hugo/content/posts/my-first-post.md b/content/posts/my-first-post.md similarity index 100% rename from hugo/content/posts/my-first-post.md rename to content/posts/my-first-post.md diff --git a/hugo/go.mod b/go.mod similarity index 100% rename from hugo/go.mod rename to go.mod diff --git a/hugo/go.sum b/go.sum similarity index 100% rename from hugo/go.sum rename to go.sum diff --git a/hugo/.gitignore b/hugo/.gitignore deleted file mode 100644 index 86c95ef..0000000 --- a/hugo/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -# Generated files by hugo -/public/ -/resources/_gen/ -/assets/jsconfig.json -hugo_stats.json - -# Executable may be added to repository -hugo.exe -hugo.darwin -hugo.linux - -# Temporary lock file while building -/.hugo_build.lock