-
Notifications
You must be signed in to change notification settings - Fork 82
63 lines (51 loc) · 1.64 KB
/
init.yml
File metadata and controls
63 lines (51 loc) · 1.64 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
name: Init
on:
workflow_call:
jobs:
init_ubuntu24:
runs-on: ubuntu-24.04
env:
PUPPETEER_CACHE_DIR: ${{ github.workspace }}/node_modules/.chromium
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Cache venv
uses: actions/cache@v4
with:
path: .venv
key: venv_ubuntu24_${{ hashFiles('pdm.lock') }}
- name: Set up venv
if: steps.venv_ubuntu24.outputs.cache-hit != 'true'
run: |
python3.13 -m venv ".venv"
source .venv/bin/activate
pip install pdm==2.22.3
pdm install
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- name: Set up npm
run: |
npm ci
- name: Deploy package
run: |
source .venv/bin/activate
pdm run deploy
- name: Build package
run: |
source .venv/bin/activate
pdm run build
- name: Cache package
uses: actions/cache@v4
with:
path: dist/
key: package_${{ github.run_id }}