-
Notifications
You must be signed in to change notification settings - Fork 10
38 lines (28 loc) · 1.01 KB
/
build.yml
File metadata and controls
38 lines (28 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Build and Deploy Docs
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
check-flake:
runs-on: ci-ocf-mkdocs
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/flake-checker-action@v9
build_and_deploy:
runs-on: ci-ocf-mkdocs
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build with Nix
run: nix build
- name: Setup SSH keys
run: |
echo '${{ secrets.BESTDOCS_DEPLOY_PRIVKEY }}' > id_ed25519
chmod 400 id_ed25519
echo "amethyst.ocf.berkeley.edu ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIlmVSSUC4PTOzfMvsHbUVr1e+7GLXvIPx1tX+W3CIU1" > known_hosts
chmod 400 known_hosts
- name: Deploy with rsync
run: nix develop .#deploy -c rsync -e "ssh -v -o UserKnownHostsFile=known_hosts -i id_ed25519" --verbose --compress --partial --checksum --progress --human-readable --archive --delete result/ deploy-bestdocs@amethyst.ocf.berkeley.edu:/var/www/bestdocs