Merge pull request #144 from bitovi/TR-49-Add-dist-to-gitignore #6
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: Feature Build | |
on: | |
push: | |
branches: [main] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- name: Sync with Staging | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Actions" | |
git config pull.rebase false | |
git pull origin staging --allow-unrelated-histories | |
- name: Run Build | |
run: | | |
npm ci | |
npm run build | |
- name: Commit `dist` Folder to `staging` | |
run: | | |
git add -f public/dist/ | |
git commit --no-verify -m 'Build artifacts' || echo "No changes to commit" | |
git push origin HEAD:staging |