-
Notifications
You must be signed in to change notification settings - Fork 1
/
.cirrus.yml
76 lines (69 loc) · 2 KB
/
.cirrus.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
lint_task:
environment:
CIRRUS_SHELL: direct
container:
image: ghcr.io/astral-sh/ruff
script:
- /ruff check
check_versions_task:
matrix:
- freebsd_instance: {image_family: freebsd-14-0}
- container: {image: fedora:latest}
- container:
matrix:
- image: archlinux:latest
- image: manjarolinux/base:latest
install_script: pacman -Sy --noconfirm python3
- container:
matrix:
- image: debian:oldstable-slim
- image: debian:stable-slim
- image: ubuntu:latest
install_script:
- apt-get -y update
- apt-get -y install python3
- container:
matrix:
- image: opensuse/leap:latest
- image: opensuse/tumbleweed:latest
install_script: zypper install --no-confirm python3
script: python3 ./check_versions.py
json_artifacts:
path: "source/*.json"
render_task:
depends_on:
- lint
- check_versions
container:
image: python:3-slim
install_script:
- pip install lxml
script:
- python3 -m generate_site $CIRRUS_BUILD_ID
- stat _site/index.html
- tar -cf site.tar _site/
site_artifacts:
path: "site.tar"
# Publish updates merged to the main branch
publish_task:
skip: $BRANCH != 'main'
depends_on:
- render
container:
image: node:20-bookworm
env:
TOKEN:
ENCRYPTED[ec6da05d365917ed543e307555cbd9c618bbd41db7dee828daf7b01825adef48f547db89ead63b99418fe07a9d41b43a]
SITE_ID:
ENCRYPTED[a408add4551cd62fe8a5a912569fda66b5e991dd1097a8eaf0a6479179a07a6ec3e5d9e0c67d16f61c67a6721a728a91]
install_script:
# https://github.com/netlify/cli/issues/1870
- npm install --unsafe-perm=true -g netlify-cli
script:
- wget "https://api.cirrus-ci.com/v1/artifact/build/${CIRRUS_BUILD_ID}/render/site/site.tar" -O - | tar -vx
- netlify deploy --auth $TOKEN --site $SITE_ID --dir=_site --prod
task:
name: CI success
container: {image: busybox}
depends_on:
- publish # marked as successful on skip