-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (54 loc) · 1.9 KB
/
release.yml
File metadata and controls
70 lines (54 loc) · 1.9 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Attach Rendered Site to Release
on:
release:
types: [published]
permissions:
contents: write
jobs:
build-and-attach:
name: Build site and upload release asset
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.14"
- name: Install uv
uses: astral-sh/setup-uv@v8.1.0
- name: Set up R
uses: r-lib/actions/setup-r@v2
- name: Install R dependencies
run: Rscript -e 'install.packages("processx")'
- name: Set up Chrome
id: setup-chrome
uses: browser-actions/setup-chrome@v2
- name: Expose Chrome as google-chrome
run: sudo ln -s "${{ steps.setup-chrome.outputs.chrome-path }}" /usr/local/bin/google-chrome
- name: Sync Python environment
run: uv sync
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Fetch Matomo usage snapshot
env:
MATOMO_TOKEN_AUTH: ${{ secrets.MATOMO_TOKEN_AUTH }}
MATOMO_BASE_URL: ${{ vars.MATOMO_BASE_URL }}
MATOMO_SITE_ID: ${{ vars.MATOMO_SITE_ID }}
MATOMO_PUBLIC_SITE_URL: ${{ vars.MATOMO_PUBLIC_SITE_URL }}
MATOMO_REPORT_START_DATE: ${{ vars.MATOMO_REPORT_START_DATE }}
run: uv run python scripts/fetch_matomo_usage.py
- name: Build release archive
run:
npm run site:build && npm run site:archive -- --tag "${{ github.event.release.tag_name }}"
- name: Upload release asset
uses: softprops/action-gh-release@v3
with:
files: release-artifacts/site-${{ github.event.release.tag_name }}.zip