.github/workflows/fetch-data.yml #22449
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
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - 'main' | |
| schedule: | |
| - cron: "0 * * * *" | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Setup Node.js environment | |
| uses: actions/setup-node@v2.5.2 | |
| with: | |
| node-version: '18.x' | |
| - name: Get dependencies | |
| run: npm install | |
| working-directory: backend/ | |
| - name: Run node.js scraping script | |
| run: node index.js | |
| working-directory: backend/ | |
| - name: Install react dependencies | |
| run: npm install | |
| working-directory: gh-pages/stuttgart-soccer-24-vue | |
| - name: Build Frontend | |
| run: | | |
| npm run build | |
| working-directory: gh-pages/stuttgart-soccer-24-vue | |
| - name: Deploy | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_branch: gh-pages | |
| publish_dir: gh-pages/stuttgart-soccer-24-vue/dist | |
| user_name: 'github-actions[bot]' | |
| user_email: 'github-actions[bot]@users.noreply.github.com' |