-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (70 loc) · 3.44 KB
/
cd.yaml
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
name: Examples
on:
push:
branches: [ main ]
workflow_dispatch: # Allow the workflow to be triggered manually
jobs:
deployment:
runs-on: ubuntu-latest
strategy:
matrix:
config:
- name: cuda cmake example
template_dir: template/cuda
config_file: .github/configs/template_inputs_cuda_cmake.yml
publish_dir: example-cuda-cmake
repo_name: x-pt/example-cuda-cmake
- name: cuda xmake example
template_dir: template/cuda
config_file: .github/configs/template_inputs_cuda_xmake.yml
publish_dir: example-cuda-xmake
repo_name: x-pt/example-cuda-xmake
- name: cxx cmake example
template_dir: template/cxx
config_file: .github/configs/template_inputs_cxx_cmake.yml
publish_dir: example-cxx-cmake
repo_name: x-pt/example-cxx-cmake
- name: cxx xmake example
template_dir: template/cxx
config_file: .github/configs/template_inputs_cxx_xmake.yml
publish_dir: example-cxx-xmake
repo_name: x-pt/example-cxx-xmake
- name: python example
template_dir: template/py
config_file: .github/configs/template_inputs_py.yml
publish_dir: example-py
repo_name: x-pt/example-py
- name: go example
template_dir: template/go
config_file: .github/configs/template_inputs_go.yml
publish_dir: example-go
repo_name: x-pt/example-go
- name: rust example
template_dir: template/rs
config_file: .github/configs/template_inputs_rs.yml
publish_dir: example-rs
repo_name: x-pt/example-rs
- name: typescript example
template_dir: template/ts
config_file: .github/configs/template_inputs_ts.yml
publish_dir: example-ts
repo_name: x-pt/example-ts
steps:
- uses: actions/checkout@v4
- name: Setup CookieCutter
run: pipx install cookiecutter
- name: Generate ${{ matrix.config.name }}
run: cookiecutter --no-input --config-file ${{ matrix.config.config_file }} ${{ matrix.config.template_dir }}
- name: Push to ${{ matrix.config.repo_name }}
uses: peaceiris/actions-gh-pages@v4
with:
deploy_key: ${{ secrets.GH_EXAMPLE_DEPLOY_SECRET }}
external_repository: ${{ matrix.config.repo_name }}
publish_branch: main
publish_dir: ./${{ matrix.config.publish_dir }}
exclude_assets: ''
enable_jekyll: true
user_name: 'Mystic'
user_email: '[email protected]'
full_commit_message: "ci: Update ${{ matrix.config.name }}"
force_orphan: true