Skip to content

export

export #14

Workflow file for this run

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 }}