ci(deps): update appleboy/ssh-action to v1 #14
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: CI/CD | |
| on: push | |
| jobs: | |
| CI: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout π | |
| uses: actions/checkout@master | |
| - name: Setup node env π | |
| uses: actions/setup-node@v3.1.1 | |
| with: | |
| node-version: 16 | |
| check-latest: true | |
| - name: Cache node_modules π¦ | |
| uses: actions/cache@v4.3.0 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node- | |
| - name: Install dependencies π¨π»βπ» | |
| run: npm ci --prefer-offline --no-audit | |
| - name: Generate feeds π¨ | |
| run: npm start | |
| Deploy: | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| needs: CI | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: Production | |
| url: https://feeds.tchoukball.ch | |
| steps: | |
| - name: Deploy to production π | |
| uses: appleboy/ssh-action@v1.2.3 | |
| with: | |
| host: ${{vars.INFOMANIAK_SSH_HOST}} | |
| username: ${{ vars.INFOMANIAK_SSH_USERNAME }} | |
| privateKey: ${{ secrets.INFOMANIAK_SSH_PRIVATE_KEY }} | |
| passphrase: ${{ secrets.INFOMANIAK_SSH_PASSPHRASE }} | |
| script: | | |
| cd ~/sites/feeds | |
| git pull | |
| source ~/.nvm/.profile | |
| nvm install | |
| npm ci | |
| npm start |