Validate NeuroJson_io Project #24
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: Validate NeuroJson_io Project | |
| on: | |
| pull_request: | |
| branches: | |
| - "*" | |
| push: | |
| branches: | |
| - main # Runs on push to main | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out the repository | |
| uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: "18" | |
| - name: Install dependencies | |
| run: yarn install | |
| - name: Compile TypeScript | |
| run: yarn build | |
| - name: Run Security Audit | |
| run: yarn audit --level moderate | |
| - name: Copy files to the server via SFTP | |
| if: github.ref == 'refs/heads/main' | |
| uses: wlixcc/[email protected] | |
| with: | |
| server: ${{ secrets.NEUROJ_SERVER }} | |
| username: ${{ secrets.NEUROJ_SERVER_USER }} | |
| ssh_private_key: ${{ secrets.NEUROJ_SERVER_SSH_KEY }} | |
| local_path: "./*" | |
| remote_path: "/var/www/html/dev/${{ github.actor }}/" |