mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
WIP: build ts docs with ci + nix
This commit is contained in:
21
.github/workflows/upload-docs.yml
vendored
21
.github/workflows/upload-docs.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Build & deploy documentation on rs.delta.chat, c.delta.chat, and py.delta.chat
|
||||
name: Build & deploy documentation on rs.delta.chat, c.delta.chat, py.delta.chat and ts.delta.chat
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -62,3 +62,22 @@ jobs:
|
||||
echo "${{ secrets.CODESPEAK_KEY }}" > "$HOME/.ssh/key"
|
||||
chmod 600 "$HOME/.ssh/key"
|
||||
rsync -avzh -e "ssh -i $HOME/.ssh/key -o StrictHostKeyChecking=no" $GITHUB_WORKSPACE/result/html/ "delta@c.delta.chat:/home/delta/build-c/master"
|
||||
|
||||
build-ts:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
show-progress: false
|
||||
fetch-depth: 0 # Fetch history to calculate VCS version number.
|
||||
- uses: DeterminateSystems/nix-installer-action@main
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- name: Build C documentation
|
||||
run: nix build .#jsonrpc-docs
|
||||
- name: Upload to ts.delta.chat
|
||||
run: |
|
||||
mkdir -p "$HOME/.ssh"
|
||||
echo "${{ secrets.CODESPEAK_KEY }}" > "$HOME/.ssh/key"
|
||||
chmod 600 "$HOME/.ssh/key"
|
||||
rsync -avzh -e "ssh -i $HOME/.ssh/key -o StrictHostKeyChecking=no" $GITHUB_WORKSPACE/result/html/ "delta@c.delta.chat:/home/delta/build-ts/master"
|
||||
11
flake.nix
11
flake.nix
@@ -523,6 +523,17 @@
|
||||
buildPhase = ''sphinx-build -b html -a python/doc/ dist/html'';
|
||||
installPhase = ''mkdir -p $out; cp -av dist/html $out'';
|
||||
};
|
||||
jsonrpc-docs = pkgs.stdenv.mkDerivation {
|
||||
pname = "docs";
|
||||
version = manifest.version;
|
||||
src = pkgs.lib.cleanSource ./.;
|
||||
nativeBuildInputs = [
|
||||
pkgs.nodejs_21
|
||||
];
|
||||
buildPhase = "npm i && npm run docs";
|
||||
installPhase =
|
||||
"mkdir -p $out; cp -av deltachat-jsonrpc/typescript/docs $out";
|
||||
};
|
||||
};
|
||||
|
||||
devShells.default = pkgs.mkShell {
|
||||
|
||||
Reference in New Issue
Block a user