File tree Expand file tree Collapse file tree 2 files changed +25
-2
lines changed Expand file tree Collapse file tree 2 files changed +25
-2
lines changed Original file line number Diff line number Diff line change 1
1
# ASF Infrastructure Pelican Action
2
2
3
3
## Inputs
4
- * destination Pelican Output branch (required) default: asf-site
4
+ * destination Pelican Output branch (optional) default: asf-site
5
+ * publish Publish to destination branch (optional) default: true
5
6
* gfm Uses GitHub Flavored Markdown (optional) default: true
6
7
* output Pelican generated output directory (optional) default: output
7
8
* tempdir Temporary Directory name (optional) default: ../output
24
25
gfm: 'true'
25
26
```
26
27
28
+ Example workflow for only building the site, not publishing. Useful for PR tests:
29
+
30
+ ```
31
+ ...
32
+ jobs:
33
+ build-pelican:
34
+ runs-on: ubuntu-latest
35
+ steps:
36
+ - uses: actions/checkout@v4
37
+ with:
38
+ - uses: apache/infrastructure-actions/pelican@main
39
+ with:
40
+ publish: 'false'
41
+ ```
42
+
43
+
27
44
# Pelican Migration Scripts
28
45
29
46
The generate_settings.py script is designed to facilitate migrating away from the
Original file line number Diff line number Diff line change @@ -3,8 +3,12 @@ description: "Generate a Pelican website from Markdown"
3
3
inputs :
4
4
destination :
5
5
description : " Pelican Output branch"
6
- required : true
6
+ required : false
7
7
default : " asf-site"
8
+ publish :
9
+ description : " Publish the site to the destination branch. If false, the site is built but not published."
10
+ required : false
11
+ default : " true"
8
12
gfm :
9
13
description : " Uses GitHub Flavored Markdown"
10
14
required : false
@@ -100,6 +104,7 @@ runs:
100
104
python3 -B -m pelican content -e "$PP" -o ${{ inputs.tempdir }} $OPTS
101
105
102
106
- name : Check out previous branch
107
+ if : ${{ inputs.publish == 'true' }}
103
108
shell : bash
104
109
run : |
105
110
git config --global user.email "[email protected] "
@@ -119,6 +124,7 @@ runs:
119
124
fi
120
125
121
126
- name : Commit Directly to the branch
127
+ if : ${{ inputs.publish == 'true' }}
122
128
shell : bash
123
129
run : |
124
130
# Remove all existing output so deletions will be captured
You can’t perform that action at this time.
0 commit comments