Merge branch 'main' into main #10
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: Node.js CI | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: self-hosted | |
| strategy: | |
| matrix: | |
| node-version: [20.x] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: 8 # You can pin to the version you want (e.g. 8.15.4) | |
| run_install: false | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build the project | |
| run: pnpm run build --if-present | |
| - name: Setup .env | |
| run: | | |
| touch .env | |
| echo "${{ secrets.CALL_SECRETES }}" > .env | |
| - name: Restart API with PM2 | |
| run: pm2 restart BackendAPI |