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: Build and Deploy Botasaurus Server JS | |
| on: | |
| push: | |
| branches: [ master ] | |
| paths: | |
| - 'js/botasaurus-server-js/**' | |
| jobs: | |
| build-and-deploy: | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 0 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 20 | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install dependencies and build | |
| working-directory: js/botasaurus-server-js | |
| run: | | |
| npm i | |
| npm run upload | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Pull Changes | |
| run: | | |
| git pull | |
| - name: Commit & Push changes | |
| uses: actions-js/push@master | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| branch: master | |
| - name: Update Botasaurus Desktop Starter Dependencies | |
| run: | | |
| git clone https://${{ secrets.PAT }}@github.com/omkarcloud/botasaurus-desktop-starter.git desktop-starter | |
| cd desktop-starter | |
| npm i | |
| npm run update | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git pull | |
| git add . | |
| git commit -m "Update Botasaurus Desktop Starter Dependencies" | |
| git push | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |