generated from carpentries-incubator/template
-
-
Notifications
You must be signed in to change notification settings - Fork 23
53 lines (50 loc) · 1.57 KB
/
update-episodes.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
name: "Update episodes"
on:
workflow_dispatch:
push:
branches:
- literate
jobs:
generate-md-files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: 'literate'
- uses: julia-actions/setup-julia@latest
with:
version: '1.9'
- uses: julia-actions/cache@v2
- name: Run the generate script
shell: julia --project=@. --color=yes {0}
run: |
include(joinpath(pwd(), "generate.jl"))
- name: Upload output
uses: actions/upload-artifact@v4
with:
name: output
path: output
move-files-to-main:
runs-on: ubuntu-latest
needs: generate-md-files
steps:
- uses: actions/checkout@v4
with:
ref: 'main'
- name: Download files
uses: actions/download-artifact@v4
with:
name: output
path: output
- name: Move files
run: |
ls -RF
rsync -t -d --delete output/carpentries/*.md episodes
rsync -t -r --delete output/carpentries/code/ ./code
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
delete-branch: true
base: main
title: Update episodes from Literate.jl source files
add-paths: episodes