prepare build infrastructure #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Prepare data | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
prepare-data: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Install Dependencies | |
run: npm install | |
- name: Run Script to Prepare data | |
run: node build_scripts/prepare_data.mjs | |
- name: Commit and Push Changes | |
env: | |
GH_TOKEN: ${{ secrets.PUBLISH_TOKEN }} | |
run: | | |
git config --global user.name 'GitHub Actions' | |
git config --global user.email '[email protected]' | |
git add . | |
git commit -m "Prepare data" | |
git push https://${GH_TOKEN}@github.com/${{ github.repository }}.git HEAD:${{ github.ref }} |