Skip to content

Commit d014499

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

File tree

3 files changed

+51
-6
lines changed

3 files changed

+51
-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: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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'
11+
default: 'calendars'
12+
output_dir:
13+
description: 'Output directory'
14+
default: 'output'
15+
extra_options:
16+
description: extra options to git-calendar build
17+
default: '-i out/index.html -b out/body.html'
18+
text_timezones:
19+
description: >
20+
Extra options to be added to make txt files of
21+
calendar contents. Example: --timezone=Europe/Helsinki --timezone=Europe/Stockholm
22+
pages_deploy:
23+
description: "Deploy to GitHub pages. Use only if you don't have another pages deployment. Default: true."
24+
default: true
25+
26+
runs:
27+
using: "composite"
28+
steps:
29+
- name: Set up Python
30+
uses: actions/setup-python@v5
31+
with:
32+
python-version: '3.x'
33+
- name: Install dependencies
34+
shell: bash
35+
run: |
36+
pip install https://github.com/coderefinery/git-calendar/archives/main.zip
37+
pip install ${{ github.action_path }}
38+
- name: build
39+
shell: bash
40+
run: |
41+
git-calendar ${{ inputs.calendar_dir }}/*.yaml -o ${{ inputs.output_dir}} ${{ inputs.text_timezones}} --edit-link=https://github.com/$GITHUB_REPOSITORY
42+
- name: Upload artifact
43+
uses: actions/upload-pages-artifact@v3
44+
with:
45+
path: ${{ inputs.output_dir }}
46+
- name: Deploy to GitHub Pages
47+
uses: actions/deploy-pages@v4
48+
if: ${{ inputs.pages_deploy }}:
49+

build.sh

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

0 commit comments

Comments
 (0)