Merge pull request #7021 from StoDevX/renovate-up-concurrent-limit #1314
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: Validate/Deploy Data | |
on: | |
push: { branches: [master] } | |
jobs: | |
validate-then-deploy: | |
name: Validate, then deploy data | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 | |
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3 | |
with: {node-version-file: '.node-version'} | |
- name: Install dependencies | |
run: npm ci | |
- name: Validate the data | |
run: | | |
npm run validate-bus-data | |
npm run validate-data | |
# Having validated the data, we now prepare a bundle. This script creates | |
# files in a docs/ directory. | |
- name: Bundle the data | |
run: npm run bundle-data | |
# Notes: actions/checkout@v2 no longer fetches entire history nor enters | |
# detached HEAD state. We really just need to check out an (orphaned) | |
# branch and then add, commit, and push the appropriate directory. | |
- name: Commit the data | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git checkout --orphan "gh-pages-$GITHUB_SHA" | |
git --work-tree=docs add . | |
git commit -m "Automated data deployment at $(date -Is)" | |
git show --stat HEAD | |
# If the previous commit successfully happened, download the latest state | |
# of the remote branch gh-pages. | |
- name: Deploy the data | |
run: | | |
git fetch --prune --unshallow origin gh-pages | |
git push --force-with-lease origin "gh-pages-$GITHUB_SHA:gh-pages" |