-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (40 loc) · 1.13 KB
/
export.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
name: export
on:
workflow_dispatch:
env:
SCHED_URL: https://snowcamp2024.sched.com/
BRANCH: data-2024
jobs:
export_data:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- name: Use Node.js v18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies and build
run: |
npm ci
npm run build
- name: Export OpenFeedback data
run: npm start
env:
SCHED_KEY_RO: ${{ secrets.SCHED_KEY_RO }}
- name: Publish data to branch
run: |
mkdir -p $BRANCH
mv openfeedback.json $BRANCH
cd $BRANCH
git config --global user.name "$GITHUB_USER"
git config --global user.email "noda@free.com"
git init
git checkout --orphan $BRANCH
git add openfeedback.json
git commit -m "Update data"
git remote add origin https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com//${{ github.repository }}.git
git push origin $BRANCH --force
env:
GITHUB_USER: sinedied
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}