-
Notifications
You must be signed in to change notification settings - Fork 2
79 lines (79 loc) · 2.49 KB
/
ci.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
name: Mkdocs+Juvix CI
'on':
push:
branches:
- main
env:
CI: true
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PYTHON_VERSION: 3.x
POETRY_VERSION: 1.8.3
GIT_COMMITTER_EMAIL: [email protected]
GIT_COMMITTER_NAME: Tara
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
concurrency:
group: "${{ github.workflow }}-${{ github.head_ref || github.run_id }}"
cancel-in-progress: true
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
submodules: true
fetch-depth: 0
- run: |
git config --global user.name 'Tara'
git config --global user.email '[email protected]'
- name: Install Juvix
uses: jaxxstorm/[email protected]
with:
repo: anoma/juvix
tag: v0.6.6
cache: enable
rename-to: juvix
chmod: 0755
- uses: actions/[email protected]
with:
key: juvix-cache-${{ hashFiles('**/*.juvix.md') }}-${{ hashFiles('**/*.juvix') }}
path: .juvix-build
restore-keys: |
juvix-cache-
- name: Install Python
uses: actions/[email protected]
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Poetry
uses: abatilo/[email protected]
with:
poetry-version: ${{ env.POETRY_VERSION }}
- name: Cache .cache
uses: actions/[email protected]
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- name: Install Linux dependencies
run: sudo apt-get install -y libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev pngquant graphviz
- name: Install Python dependencies
run: poetry install
- name: Run test
run: poetry run pytest
- name: Create MkDocs Project
run: |
juvix-mkdocs new -f -n --no-run-server --no-open --project-name my-juvix-project
- name: Build MkDocs Project
run: juvix-mkdocs build -p my-juvix-project
env:
SITE_URL: https://anoma.github.io/juvix-mkdocs
- if: success()
uses: JamesIves/[email protected]
with:
folder: my-juvix-project/site
token: ${{ secrets.GITHUB_TOKEN }}
clean: true
git-config-name: ${{ env.GIT_COMMITTER_NAME }}
git-config-email: ${{ env.GIT_COMMITTER_EMAIL }}