Rewrite to typescript #72
This file contains hidden or 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: Node.js CI | |
| on: [push] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Get Repo | |
| uses: actions/checkout@v4 | |
| - name: Setup python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| - name: Get Songbook | |
| uses: actions/checkout@v3 | |
| with: | |
| repository: f-klubben/sangbog | |
| path: sangbog | |
| - name: Build songs (with failover) | |
| run: | | |
| set -e | |
| echo "Building songs..." | |
| if ! npm run build-songs; then | |
| echo "GITHUB WORKFLOW: Build songs failed — creating empty file as fallback." | |
| echo "{}" > pages/songbook/songs.json | |
| fi | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| - run: npm i | |
| - run: npm run build | |
| # Re-enable whenever tests are added | |
| #- run: npm test | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: frontend | |
| path: build/dist |