SearchAndReplace Build #18
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: SearchAndReplace Build | |
| on: | |
| workflow_run: | |
| workflows: ["SearchAndReplace CI"] | |
| types: [completed] | |
| branches: [master] | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v3 | |
| - name: Checkout to Master Built branch | |
| if: github.ref == 'refs/heads/master' | |
| env: | |
| USER_EMAIL: "badasswpdev@gmail.com" | |
| USER_NAME: "badasswp" | |
| run: | | |
| git config user.email "${USER_EMAIL}" | |
| git config user.name "${USER_NAME}" | |
| git checkout -b master-built | |
| - name: Set up Node.js 20.x | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 20.x | |
| - name: Build Dist folder | |
| run: | | |
| yarn install && yarn build | |
| git add dist/ -f | |
| git rm package.json | |
| - name: Clean Up Files | |
| run: | | |
| while IFS= read -r file; do | |
| git rm -r "$file" | |
| done < .deployignore | |
| git rm .deployignore | |
| git clean -f yarn.lock | |
| git clean -f node_modules | |
| - name: Push to Master Built | |
| run: | | |
| git commit -m "push to master-built" | |
| git push origin master-built -f | |
| rm -rf .git |