-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (47 loc) · 1.47 KB
/
generateicsfile.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
53
54
55
56
57
58
name: Generate calendar from project
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
inputs:
sync:
description: "File synchronization"
required: true
default: "full"
# schedule:
# - cron: '1 0 * * *'
project_card:
types: [created, moved, converted, edited, deleted]
project_column:
types: [created, updated, moved, deleted]
jobs:
build:
name: Run python scripts
runs-on: ubuntu-latest
env:
ICS_PATH: ${{ github.workspace }}/resources/MealPlanner.ics
steps:
- name: Check-out repository
uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install Python dependencies
run: pip install -Uq PyGithub
- name: Generate ICS file
run: python .github/scripts/generateics.py
env:
CONTEXT_GITHUB: ${{ toJson(github) }}
- name: Transfer Status
run: echo "Transfer Status - ${{ steps.connect.outputs.transferStatus }}"
- name: Upload Files
id: upload
uses: wpengine/github-action-wpe-site-deploy@v3
with:
WPE_SSHG_KEY_PRIVATE: ${{ secrets.WPE_SSHG_KEY_PRIVATE }}
WPE_ENV: "jamescallaghan"
SRC_PATH: ${{ env.ICS_PATH }}
REMOTE_PATH: "."