Skip to content

Generate calendar from project #1916

Generate calendar from project

Generate calendar from project #1916

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:
# 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@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4
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: Upload Files
id: upload
uses: Creepios/sftp-action@v1.0.5
with:
host: ${{ secrets.WPE_HOSTNAME }}
port: ${{ secrets.WPE_PORT }}
username: ${{ secrets.WPE_USERNAME }}
password: ${{ secrets.WPE_PASSWORD }}
localPath: ${{ env.ICS_PATH }}
remotePath: ""