-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (38 loc) · 1.12 KB
/
Copy pathdeploy_docs.yml
File metadata and controls
46 lines (38 loc) · 1.12 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
name: Deploy docs
on:
push:
tags:
- 'doc_deploy*'
jobs:
deploy_docs:
runs-on: ubuntu-latest
env:
MSH_DOC_HOST: ${{ secrets.MSH_DOC_HOST }}
MSH_DOC_KEY: ${{ secrets.MSH_DOC_KEY }}
MSH_DOC_PATH: ${{ secrets.MSH_DOC_PATH }}
MSH_DOC_USER: ${{ secrets.MSH_DOC_USER }}
steps:
- uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
cache-dependency-path: mshell/go.sum
go-version-file: 'mshell/go.mod'
- name: Setup SSH
run: |
install -m 700 -d ~/.ssh
printf '%s' "${{ secrets.MSH_DOC_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -H "${{ secrets.MSH_DOC_HOST }}" >> ~/.ssh/known_hosts
- name: Build go
run: cd mshell && go build -o mshell && cp mshell msh
- name: Set Go PATH, MSHSTDLIB
run: |
realpath ./mshell >> "$GITHUB_PATH"
printf "MSHSTDLIB=%s\n" "$(realpath ./lib/std.msh)" >> "$GITHUB_ENV"
- name: Build and deploy docs
run: |
cd doc/
mshell build.msh
cd build/
mshell deploy.msh