summaryrefslogtreecommitdiff
path: root/.tangled/workflows/deploy.yml
blob: e0087a20d9628f12e9653a8a763899fd63bd20be (plain) (blame)
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
38
39
when:
  - event: ["push"]
    branch: ["master"]

engine: "nixery"

dependencies:
  nixpkgs:
    - nix
    - coreutils
    - curl
    - glibc
    - nodejs

environment:
  SITE_PATH: "result/dist"
  SITE_NAME: "personal"
  WISP_HANDLE: "skilet.ro"

steps:
  - name: Build Site with Nix
    command: |
      export PATH="$HOME/.nix-profile/bin:$PATH"

      nix build

  - name: Deploy to Wisp
    command: |
      # Download Wisp CLI
      curl https://sites.wisp.place/nekomimi.pet/wisp-cli-binaries/wisp-cli-x86_64-linux -o wisp-cli

      chmod +x wisp-cli

      # Deploy to Wisp
      ./wisp-cli \
        "$WISP_HANDLE" \
        --path "$SITE_PATH" \
        --site "$SITE_NAME" \
        --password "$WISP_APP_PASSWORD"