Bump EndBug/add-and-commit from 9 to 10 (#155) #4
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: Update API constants | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - .github/workflows/update-api-constants.yaml | |
| - configuration/constants.json | |
| concurrency: commits-pages | |
| env: | |
| publish-branch: gh-pages | |
| jobs: | |
| update-api-constants: | |
| runs-on: ubuntu-latest | |
| name: Update constants | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/checkout@v6 | |
| with: | |
| ssh-key: ${{ secrets.POWERCASTDEPLOY }} | |
| ref: ${{ env.publish-branch }} | |
| path: github-pages | |
| - shell: bash | |
| name: Clean up previous constants | |
| run: | | |
| cd configuration/constants | |
| constants=$(echo *) | |
| cd - | |
| cd ./github-pages/api/ | |
| rm -rf $constants || true | |
| - shell: bash | |
| name: Add constants | |
| run: cp -rv configuration/constants/* ./github-pages/api/ | |
| - uses: EndBug/add-and-commit@v10 | |
| name: Publish constants | |
| with: | |
| cwd: github-pages | |
| add: "['api/']" | |
| push: --set-upstream origin ${{ env.publish-branch }} | |
| default_author: github_actions | |
| message: Publish constants via workflow |