mirror of
https://github.com/chatmail/core.git
synced 2026-04-06 07:32:12 +03:00
98 lines
3.0 KiB
YAML
98 lines
3.0 KiB
YAML
name: Build & deploy documentation on rs.delta.chat, c.delta.chat, and py.delta.chat
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build-rs:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
show-progress: false
|
|
- name: Build the documentation with cargo
|
|
run: |
|
|
cargo doc --package deltachat --no-deps --document-private-items
|
|
- name: Upload to rs.delta.chat
|
|
uses: up9cloud/action-rsync@v1.3
|
|
env:
|
|
USER: ${{ secrets.USERNAME }}
|
|
KEY: ${{ secrets.KEY }}
|
|
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/ "delta@py.delta.chat:/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 c.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-c/master"
|
|
|
|
build-ts:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: ./deltachat-jsonrpc/typescript
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
show-progress: false
|
|
fetch-depth: 0 # Fetch history to calculate VCS version number.
|
|
- name: Use Node.js
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: '18'
|
|
- name: Install latest nightly
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
- name: npm build
|
|
run: npm build
|
|
- name: Install dependencies
|
|
run: npm install
|
|
- name: Run docs script
|
|
run: npm run docs
|
|
- name: Upload to ts.delta.chat
|
|
uses: up9cloud/action-rsync@v1.3
|
|
env:
|
|
USER: ${{ secrets.USERNAME }}
|
|
KEY: ${{ secrets.KEY }}
|
|
HOST: "delta.chat"
|
|
SOURCE: "/deltachat-jsonrpc/typescript/docs/"
|
|
TARGET: "/var/www/html/ts/" |