-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (56 loc) · 1.89 KB
/
refresh.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
59
60
61
62
63
64
65
66
67
68
69
name: Refresh ICS
on:
schedule:
# Run at 12:00am CST every day
- cron: "0 6 * * *"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
refresh:
runs-on: ubuntu-latest
environment: Deployment
steps:
# Checkout master
- uses: actions/checkout@v2
# Setup node
- uses: actions/setup-node@v2
with:
node-version: "16"
# Install dependencies
- name: Install dependencies
run: |
npm install
# Run typescript compiler
- name: Compile Typescript
run: |
npm run build
# Setup gcloud
- uses: google-github-actions/setup-gcloud@v0
with:
service_account_key: ${{ secrets.GCP_SA_KEY }}
export_default_credentials: true
# Run the ics script and output resulting ics to output dir
- name: Build ICS file
env:
EVENT_SPREADSHEET_ID: ${{ secrets.EVENT_SPREADSHEET_ID }}
run: |
mkdir output
node build/index.js > output/calendar.ics
# This script now runs as part of the leadership site repo --> https://github.com/acmutd/leadership
# Run the birthday script and send slack messages
# - name: Run Birthday Script
# env:
# BIRTHDAY_SPREADSHEET_ID: ${{ secrets.BIRTHDAY_SPREADSHEET_ID }}
# SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
# run: |
# npm run birthday
# Abuse this action intended for deploying a gh-pages site to instead push
# the ics file to its own branch
- name: Deploy ICS file
uses: JamesIves/github-pages-deploy-action@4.0.0
with:
branch: ics
folder: output
commit-message: Updating calendar.ics
git-config-name: github-actions[bot]
git-config-email: 41898282+github-actions[bot]@users.noreply.github.com