name: CI on: push: pull_request: workflow_dispatch: permissions: contents: read concurrency: group: ${{ github.workflow }}-${{ github.ref }} jobs: build: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v7 - name: Set up Node.js uses: actions/setup-node@v7 with: node-version: 22 cache: npm - name: Install dependencies run: npm ci - name: Generate source UI strings run: npm run write-translations -- --locale ru --override - name: Push and pull strings from the Crowdin uses: crowdin/github-action@v3 if: github.ref == 'refs/heads/master' with: download_translations: true push_translations: false # Run as the owner of the workspace instead of root, so the downloaded files belong to the runner user user: auto env: CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} - name: Detect locales to publish if: github.ref == 'refs/heads/master' run: echo "DOCS_LOCALES=$(node scripts/crowdin-locales.mjs)" >> "$GITHUB_ENV" env: CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} - name: Typecheck run: npm run typecheck - name: Build docs run: npm run build - name: Upload GitHub Pages artifact uses: actions/upload-pages-artifact@v5 if: github.ref == 'refs/heads/master' with: path: build deploy: needs: build if: github.ref == 'refs/heads/master' runs-on: ubuntu-latest permissions: pages: write id-token: write environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} # Never cancel a deployment in progress concurrency: group: pages cancel-in-progress: false steps: - id: deployment name: Deploy to the GitHub Pages uses: actions/deploy-pages@v5