diff --git a/.github/workflows/fishjam-chat-deploy.yml b/.github/workflows/fishjam-chat-deploy.yml new file mode 100644 index 0000000..576850c --- /dev/null +++ b/.github/workflows/fishjam-chat-deploy.yml @@ -0,0 +1,54 @@ +name: Deploy Fishjam Chat as static page + +on: + push: + branches: ["main"] + paths: + - "web-react/fishjam-chat/**" + - ".github/workflows/fishjam-chat-deploy.yml" + 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 + defaults: + run: + working-directory: web-react/fishjam-chat + steps: + - name: Checkout + uses: actions/checkout@v5 + + - name: Setup Node.js + uses: actions/setup-node@v5 + with: + node-version: "22" + cache: "yarn" + cache-dependency-path: ./web-react/fishjam-chat/yarn.lock + + - name: Install dependencies + run: yarn install --frozen-lockfile + + - 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: 3 + source: web-react/fishjam-chat/dist/* + target: /usr/share/nginx/html diff --git a/.github/workflows/livestreaming-deploy.yml b/.github/workflows/livestreaming-deploy.yml new file mode 100644 index 0000000..2fac86b --- /dev/null +++ b/.github/workflows/livestreaming-deploy.yml @@ -0,0 +1,56 @@ +name: Deploy Livestreaming example + +on: + push: + branches: ["main"] + paths: + - "web-react/livestreaming/**" + - ".github/workflows/livestreaming-deploy.yml" + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + defaults: + run: + working-directory: web-react/livestreaming + steps: + - name: Checkout + uses: actions/checkout@v5 + + - name: Setup Pages + uses: actions/configure-pages@v5 + + - name: Setup Node.js + uses: actions/setup-node@v5 + with: + node-version: "22" + cache: "yarn" + cache-dependency-path: ./web-react/livestreaming/yarn.lock + + - name: Install dependencies + run: yarn install --frozen-lockfile + + - name: Build project + run: yarn build --base "./" + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: "web-react/livestreaming/dist" + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4