1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 20:36:40 +07:00

Compare commits

..

2 commits

Author SHA1 Message Date
Fedor Katurov
a553fc9ff7 add forgejo workflow
Some checks failed
Build & Publish / Build & Publish (push) Has been cancelled
2025-03-24 15:47:11 +07:00
Fedor Katurov
1281a3c595 fix images pattern 2025-03-24 15:42:43 +07:00
4 changed files with 76 additions and 26 deletions

View file

@ -13,8 +13,8 @@ steps:
branch:
- master
environment:
NEXT_PUBLIC_API_HOST: https://pig.vault48.org/
NEXT_PUBLIC_REMOTE_CURRENT: https://pig.vault48.org/static/
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
settings:

View file

@ -2,6 +2,6 @@
# NEXT_PUBLIC_REMOTE_CURRENT=https://pig.staging.vault48.org/static/
# NEXT_PUBLIC_API_HOST=http://localhost:7777/
# NEXT_PUBLIC_REMOTE_CURRENT=http://localhost:7777/static/
NEXT_PUBLIC_API_HOST=https://pig.vault48.org/
NEXT_PUBLIC_REMOTE_CURRENT=https://pig.vault48.org/static/
NEXT_PUBLIC_API_HOST=https://vault48.org/api/
NEXT_PUBLIC_REMOTE_CURRENT=https://vault48.org/static/
NEXT_PUBLIC_BOT_USERNAME=vault48testbot

View file

@ -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

View file

@ -2,7 +2,10 @@
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
});
const withTM = require('next-transpile-modules')(['ramda', '@v9v/ts-react-telegram-login']);
const withTM = require('next-transpile-modules')([
'ramda',
'@v9v/ts-react-telegram-login',
]);
module.exports = withBundleAnalyzer(
withTM({
@ -10,13 +13,14 @@ module.exports = withBundleAnalyzer(
async rewrites() {
return [
{
source: '/post:id',
// everything except 'post' is for backwards compatibility here
source: '/(post|photo|blog|song|video|cell):id',
destination: '/node/:id',
},
{
source: '/~:username',
destination: '/profile/:username',
}
},
];
},
@ -26,8 +30,8 @@ module.exports = withBundleAnalyzer(
remotePatterns: [
{
protocol: 'https',
hostname: '*.vault48.org',
pathname: '/**',
hostname: 'vault48.org',
pathname: '/static/**',
},
{
protocol: 'https',
@ -41,5 +45,5 @@ module.exports = withBundleAnalyzer(
},
],
},
})
}),
);