From f083b488ba6c07f0952aefc43cc6ab1068a9fa42 Mon Sep 17 00:00:00 2001 From: Fedor Katurov Date: Mon, 24 Mar 2025 15:47:11 +0700 Subject: [PATCH] add forgejo workflow --- .forgejo/workflows/build.yml | 46 ++++++++++++++++++++++++++++++++++++ src/pages/node/[id].tsx | 4 +++- 2 files changed, 49 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 00000000..25d067df --- /dev/null +++ b/.forgejo/workflows/build.yml @@ -0,0 +1,46 @@ +name: Build & Publish + +on: + push: + branches: [master] + +jobs: + push_to_registry: + name: Build & Publish + runs-on: ubuntu-22.04 + permissions: + packages: write + contents: read + attestations: write + id-token: write + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Registry Login + uses: docker/login-action@v3 + with: + registry: git.vault48.org + username: ${{ secrets.username }} + password: ${{ secrets.password }} + + - name: Extract docker metadata + id: meta + uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + with: + images: git.vault48.org/${{ env.GITHUB_REPOSITORY }} + + - name: Build and push Docker image + id: push + uses: docker/build-push-action@v6 + with: + context: . + file: ./docker/nextjs/Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + build-args: | + NEXT_PUBLIC_API_HOST=https://vault48.org/api/ + NEXT_PUBLIC_REMOTE_CURRENT=https://vault48.org/static/ + NEXT_PUBLIC_PUBLIC_HOST=https://vault48.org/ + NEXT_PUBLIC_BOT_USERNAME=vault48bot \ No newline at end of file diff --git a/src/pages/node/[id].tsx b/src/pages/node/[id].tsx index 57a50fcd..26c829e6 100644 --- a/src/pages/node/[id].tsx +++ b/src/pages/node/[id].tsx @@ -49,7 +49,9 @@ export const getStaticPaths = async () => { .map((it) => it.id!.toString()); return { - paths: recentIDs.map((id) => ({ params: { id } })), + // this was generating too much garbage, so skip it + // paths: recentIDs.map((id) => ({ params: { id } })), + paths: [], fallback: true, }; };