Skip to content

Commit 84ef8f1

Browse files
committed
Accumulated updates for Github Action / python package usage
1 parent 44d4c07 commit 84ef8f1

File tree

3 files changed

+53
-6
lines changed

3 files changed

+53
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ improved.
1818

1919

2020

21-
## Example
21+
## Example deployments
2222

2323
The CodeRefinery calendar
2424
* [Built calendar site](https://coderefinery.github.io/calendar/)
25-
(main landing page for most projects)
25+
(the auto-generated landing page)
2626
* [Source repository](https://github.com/coderefinery/calendar)
2727
* Optional: [Calendars inserted into
2828
website](https://coderefinery.org/calendars/) ([source](https://github.com/coderefinery/coderefinery.org/blob/main/content/calendars.md))

action.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# CC-0 (public domain)
2+
# but please link to the source so that people can more easily reuse
3+
# (if relevant)
4+
5+
name: git-calendar
6+
description: Manage multiple branches in gh-pages
7+
8+
inputs:
9+
calendar_dir:
10+
description: 'Input calendar directory (default calendars, globs *.yaml from there)'
11+
default: 'calendars'
12+
output_dir:
13+
description: 'Output directory (default output)'
14+
default: 'output'
15+
#extra_options:
16+
#description: extra options to git-calendar build
17+
#default: '-i/index.html -b out/body.html'
18+
index_file:
19+
default: index.html
20+
text_timezones:
21+
description: >
22+
Extra options to be added to make txt files of
23+
calendar contents. Example: --timezone=Europe/Helsinki --timezone=Europe/Stockholm
24+
pages_deploy:
25+
description: "Deploy to GitHub pages. Use only if you don't have another pages deployment. Default: true."
26+
default: true
27+
28+
runs:
29+
using: "composite"
30+
steps:
31+
- name: Set up Python
32+
uses: actions/setup-python@v5
33+
with:
34+
python-version: '3.x'
35+
- name: Install dependencies
36+
shell: bash
37+
run: |
38+
#pip install https://github.com/coderefinery/git-calendar/archives/main.zip
39+
pip install ${{ github.action_path }}
40+
- name: build
41+
shell: bash
42+
run: |
43+
git-calendar ${{ inputs.calendar_dir }}/*.yaml -o ${{ inputs.output_dir}} ${{ inputs.text_timezones}} --edit-link=https://github.com/$GITHUB_REPOSITORY ${{ inputs.index_file && inputs.output_dir + '/' + inputs.index_file }}
44+
- name: Upload artifact
45+
uses: actions/upload-pages-artifact@v4
46+
with:
47+
path: ${{ inputs.output_dir }}
48+
- name: Deploy to GitHub Pages
49+
uses: actions/deploy-pages@v4
50+
if: ${{ inputs.pages_deploy }}
51+

build.sh

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)