-
Notifications
You must be signed in to change notification settings - Fork 6
50 lines (38 loc) · 1.21 KB
/
deploy.yml
File metadata and controls
50 lines (38 loc) · 1.21 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
38
39
40
41
42
43
44
45
46
47
48
49
50
name: deploy
on:
push:
branches: [ src ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/checkout@v2
with:
ref: master
path: public
- uses: cachix/install-nix-action@v12
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Setup nix-shell
run: nix-shell --run 'true'
- name: Build
run: nix-shell --run 'emacs -q --batch --load build.el'
- name: Setup git
run: |
git config --global user.name github-actions
git config --global user.email github-actions@github.com
- name: Deploy to github pages
run: nix-shell --run 'emacs -q --batch --load deploy.el'
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
name: id_ed25519
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: ${{ secrets.KNOWN_HOSTS }}
- name: Deploy to guix.org.cn
run: nix-shell --run 'rsync -rhP --delete public/* github@guix.org.cn:/srv/http/guix.org.cn'