Deploy Fishjam Chat as static page #219
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: Deploy Fishjam Chat as static page | |
| on: | |
| push: | |
| branches: ["main"] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: "fishjam-chat" | |
| cancel-in-progress: false | |
| jobs: | |
| build-deploy: | |
| if: github.actor != 'dependabot[bot]' | |
| environment: | |
| name: fishjam-chat | |
| url: ${{ vars.FISHJAM_CHAT_URL }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24.4.1 | |
| cache: "npm" | |
| - name: Use corepack | |
| run: corepack enable | |
| - name: Install node dependencies | |
| run: yarn | |
| - name: Build project | |
| run: yarn build | |
| - name: Copy files to deployment server | |
| uses: appleboy/scp-action@v0.1.7 | |
| with: | |
| host: ${{ vars.FISHJAM_CHAT_HOST }} | |
| username: ${{ secrets.FISHJAM_CHAT_USERNAME }} | |
| key: ${{ secrets.FISHJAM_CHAT_PRIVATE_KEY }} | |
| rm: true | |
| strip_components: 4 | |
| source: examples/react-client/fishjam-chat/dist/* | |
| target: /usr/share/nginx/html |