CI build #1062
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
# build and commit the dist folder after successful CI | |
name: CI build | |
on: | |
workflow_run: | |
workflows: | |
- 'CI' | |
types: | |
- 'completed' | |
jobs: | |
on-success: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: 'npm' | |
# build dist folder | |
- run: npm ci | |
- run: npm run build | |
# NOTE: doesn't work if `git add dist --force` is removed | |
- run: git add dist --force | |
- run: git status | |
# commit and push dist folder | |
- uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: CI build | |
file_pattern: dist | |
add_options: '--force' |