Merge pull request #1992 from hydephp/dependabot/npm_and_yarn/package… #221
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
# This workflow will do a clean installation of node dependencies, cache/restore them, build the compiled assets, and push them. | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Build Assets | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
build-assets: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
cache: 'npm' | |
- name: Install Node.js dependencies | |
run: npm ci | |
- name: Build assets for production | |
run: npm run prod | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: 'assets' | |
path: 'dist' | |
- name: Push assets to GitHub | |
uses: EndBug/add-and-commit@v9 | |
with: | |
add: 'dist' | |
message: 'Update assets' |