Skip to content
This repository was archived by the owner on May 19, 2025. It is now read-only.

Commit 1f66fa8

Browse files
Add support for shorts and redirect urls
1 parent 3317716 commit 1f66fa8

5 files changed

Lines changed: 100 additions & 5 deletions

File tree

.github/workflows/prod-web.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,32 @@ jobs:
1414
steps:
1515
- name: Checkout
1616
uses: actions/checkout@v4
17+
1718
- name: Set up QEMU
1819
uses: docker/setup-qemu-action@v3
20+
1921
- name: Set up Docker Buildx
2022
uses: docker/setup-buildx-action@v3
21-
- name: Login to DockerHub
23+
24+
- name: Log into registry ${{ env.REGISTRY }}
2225
uses: docker/login-action@v3
2326
with:
24-
username: ${{ secrets.DOCKERHUB_USERNAME }}
25-
password: ${{ secrets.DOCKERHUB_TOKEN }}
27+
registry: ${{ env.REGISTRY }}
28+
username: ${{ github.actor }}
29+
password: ${{ secrets.GITHUB_TOKEN }}
30+
2631
- name: Extract version from package.json
2732
id: extract_version
2833
run: |
2934
VERSION=$(jq -r .version ./materialious/package.json)
3035
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
36+
3137
- name: Build and push
3238
uses: docker/build-push-action@v5
3339
with:
3440
context: ./materialious
3541
platforms: linux/amd64,linux/arm64,linux/arm/v7
3642
push: true
3743
tags: |
38-
wardpearce/materialious:latest
39-
wardpearce/materialious:${{ steps.extract_version.outputs.version }}
44+
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
45+
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.extract_version.outputs.version }}

flake.lock

Lines changed: 43 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
description = "API";
3+
4+
inputs = {
5+
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
6+
7+
systems.url = "github:nix-systems/default";
8+
};
9+
10+
outputs =
11+
{
12+
self,
13+
systems,
14+
nixpkgs,
15+
}:
16+
let
17+
eachSystem = nixpkgs.lib.genAttrs (import systems);
18+
in
19+
{
20+
devShells = eachSystem (
21+
system:
22+
let
23+
pkgs = import nixpkgs {
24+
inherit system;
25+
config.allowUnfree = true;
26+
};
27+
in
28+
{
29+
default = pkgs.mkShell {
30+
packages = with pkgs; [
31+
nodejs_latest
32+
];
33+
};
34+
}
35+
);
36+
};
37+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export async function load({ url }) {
2+
const queryParam = url.searchParams.get('q');
3+
if (queryParam) window.location.href = decodeURIComponent(queryParam);
4+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { goto } from '$app/navigation';
2+
3+
export async function load({ params }) {
4+
return goto(`/watch/${params.slug}`);
5+
}

0 commit comments

Comments
 (0)