Skip to content

Commit

Permalink
ci: build c.delta.chat docs with nix
Browse files Browse the repository at this point in the history
  • Loading branch information
link2xt committed Mar 1, 2024
1 parent 07870a6 commit cd9f6c3
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 77 deletions.
42 changes: 40 additions & 2 deletions .github/workflows/upload-docs.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Build & Deploy Documentation on rs.delta.chat
name: Build & Deploy Documentation on rs.delta.chat, c.delta.chat, py.delta.chat

on:
push:
branches:
- main

jobs:
build:
build-rs:
runs-on: ubuntu-latest

steps:
Expand All @@ -24,3 +24,41 @@ jobs:
HOST: "delta.chat"
SOURCE: "target/doc"
TARGET: "/var/www/html/rs/"

build-python:
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 Python documentation
run: nix build .#python-docs
- name: Upload to py.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/ "[email protected]:/home/delta/build/master"
build-c:
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 .#docs
- name: Upload to py.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/ "[email protected]:/home/delta/build-c/master"
26 changes: 0 additions & 26 deletions .github/workflows/upload-python-docs.yml

This file was deleted.

49 changes: 0 additions & 49 deletions scripts/concourse/docs_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,55 +15,6 @@ resources:
tag_filter: "v*"

jobs:
- name: doxygen
plan:
- get: deltachat-core-rust
trigger: true

# Build Doxygen documentation
- task: build-doxygen
config:
inputs:
- name: deltachat-core-rust
outputs:
- name: c-docs
image_resource:
source:
repository: alpine
type: registry-image
platform: linux
run:
path: sh
args:
- -ec
- |
apk add --no-cache doxygen git
cd deltachat-core-rust
scripts/run-doxygen.sh
cd ..
cp -av deltachat-core-rust/deltachat-ffi/html deltachat-core-rust/deltachat-ffi/xml c-docs/
- task: upload-c-docs
config:
inputs:
- name: c-docs
image_resource:
type: registry-image
source:
repository: alpine
platform: linux
run:
path: sh
args:
- -ec
- |
apk add --no-cache rsync openssh-client
mkdir -p ~/.ssh
chmod 700 ~/.ssh
echo "(("c.delta.chat".private_key))" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
rsync -e "ssh -o StrictHostKeyChecking=no" -avz --delete c-docs/html/ [email protected]:build-c/master
- name: python-x86_64
plan:
- get: deltachat-core-rust
Expand Down

0 comments on commit cd9f6c3

Please sign in to comment.