-
Notifications
You must be signed in to change notification settings - Fork 10
86 lines (76 loc) · 2.27 KB
/
build-and-deploy.yml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Documentation Build
# read-only repo token
# no access to secrets
# TODO change trigger to manual after testing
on:
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
pkg: [
"qojulia/QuantumOptics.jl"
]
pkgversion: [latest]
examples_repo: [
"qojulia/QuantumOptics.jl-examples"
]
docs_repo: [
"qojulia/QuantumOptics.jl-documentation"
]
steps:
- uses: actions/checkout@v4
# Install Julia
- uses: julia-actions/setup-julia@v1
with:
version: 1
arch: x64
- uses: actions/cache@v3
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@v1
# Build examples and then docs
- name: 'Build'
env:
URL: ${{ matrix.pkg }}
VERSION: ${{ matrix.pkgversion }}
run: |
set -v
mkdir -p ./pr
echo "${{ github.event.number }}" > ./pr/NR
git clone https://github.com/qojulia/QuantumOptics.jl-examples
git clone https://github.com/qojulia/QuantumOptics.jl-documentation
# build examples
cd QuantumOptics.jl-examples
julia -e '
using Pkg
Pkg.activate(".")
Pkg.instantiate()
include("make.jl")
'
# build docs
cd ../QuantumOptics.jl-documentation
julia -e '
using Pkg
Pkg.activate(".")
Pkg.instantiate()
include("make.jl")
'
# Push to complete build of documentation to FTP server
- name: 'Deploy'
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.ftp_server_url }}
username: ${{ secrets.ftp_user }}
password: ${{ secrets.ftp_password }}
local-dir: ./build/ # TODO or is that ./QuantumOptics.jl-documentation/build/ ?