Skip to content

Generate calendar from project #3301

Generate calendar from project

Generate calendar from project #3301

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: "."