+53
-48
.tangled/workflows/deploy-wisp.yml
+53
-48
.tangled/workflows/deploy-wisp.yml
···
1
-
# Deploy to Wisp.place
2
-
# This workflow builds your site and deploys it to Wisp.place using the wisp-cli
1
+
---
3
2
when:
4
-
- event: ['push']
5
-
branch: ['main']
6
-
- event: ['manual']
7
-
engine: 'nixery'
3
+
- event:
4
+
- push
5
+
branch:
6
+
- main
7
+
- event:
8
+
- manual
9
+
engine: nixery
8
10
clone:
9
-
skip: false
10
-
depth: 1
11
-
submodules: true
11
+
skip: false
12
+
depth: 1
13
+
submodules: true
12
14
dependencies:
13
-
nixpkgs:
14
-
- git
15
-
- gcc
16
-
github:NixOS/nixpkgs/nixpkgs-unstable:
17
-
- rustc
18
-
- cargo
19
-
- bun
20
-
15
+
nixpkgs:
16
+
- git
17
+
- gcc
18
+
github:NixOS/nixpkgs/nixpkgs-unstable:
19
+
- rustc
20
+
- cargo
21
+
- bun
21
22
environment:
22
-
WISP_HANDLE: 'wisp.place'
23
-
SITE_PATH: 'docs/dist'
24
-
SITE_NAME: 'docs'
23
+
WISP_HANDLE: wisp.place
24
+
SITE_PATH: docs/dist
25
+
SITE_NAME: docs
25
26
steps:
26
-
- name: 'Initialize submodules'
27
-
command: |
28
-
git submodule update --init --recursive
27
+
- name: Initialize submodules
28
+
command: |
29
+
git submodule update --init --recursive
30
+
- name: Build wisp-cli
31
+
command: >
32
+
cd cli
33
+
34
+
export PATH="$HOME/.nix-profile/bin:$PATH"
35
+
36
+
nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs
29
37
30
-
- name: 'Build wisp-cli'
31
-
command: |
32
-
cd cli
33
-
export PATH="$HOME/.nix-profile/bin:$PATH"
34
-
nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs
35
-
nix-channel --update
36
-
nix-shell -p pkg-config openssl --run '
37
-
export PKG_CONFIG_PATH="$(pkg-config --variable pc_path pkg-config)"
38
-
export OPENSSL_DIR="$(nix-build --no-out-link "<nixpkgs>" -A openssl.dev)"
39
-
export OPENSSL_NO_VENDOR=1
40
-
export OPENSSL_LIB_DIR="$(nix-build --no-out-link "<nixpkgs>" -A openssl.out)/lib"
41
-
cargo build --release
42
-
'
43
-
cd ..
44
-
- name: 'Build docs'
45
-
command: |
46
-
cd docs
47
-
bun run build
48
-
- name: 'Deploy to Wisp.place'
49
-
command: |
50
-
./cli/target/release/wisp-cli \
51
-
"$WISP_HANDLE" \
52
-
--path "$SITE_PATH" \
53
-
--site "$SITE_NAME" \
54
-
--password "$WISP_APP_PASSWORD"
38
+
nix-channel --update
39
+
40
+
nix-shell -p pkg-config openssl --run '
41
+
export PKG_CONFIG_PATH="$(pkg-config --variable pc_path pkg-config)"
42
+
export OPENSSL_DIR="$(nix-build --no-out-link "<nixpkgs>" -A openssl.dev)"
43
+
export OPENSSL_NO_VENDOR=1
44
+
export OPENSSL_LIB_DIR="$(nix-build --no-out-link "<nixpkgs>" -A openssl.out)/lib"
45
+
cargo build --release
46
+
'
47
+
48
+
cd ..
49
+
- name: Build docs
50
+
command: |
51
+
cd docs
52
+
bun run build
53
+
- name: Deploy to Wisp.place
54
+
command: |
55
+
./cli/target/release/wisp-cli \
56
+
"$WISP_HANDLE" \
57
+
--path "$SITE_PATH" \
58
+
--site "$SITE_NAME" \
59
+
--password "$WISP_APP_PASSWORD"