name: Deploy to GitHub Pages on: push: branches: - main workflow_dispatch: permissions: contents: read pages: write id-token: write concurrency: group: pages cancel-in-progress: true jobs: deploy: environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 fetch-tags: true - name: Debug git state run: | echo "=== git log (last 10) ===" git log --oneline -10 echo "" echo "=== git tag -l ===" git tag -l echo "" echo "=== git describe --tags --abbrev=0 ===" git describe --tags --abbrev=0 || echo "FAILED: no tags reachable" echo "" TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "") echo "=== tag resolved to: '$TAG' ===" if [ -n "$TAG" ]; then echo "=== git rev-list ${TAG}..HEAD --count ===" git rev-list "${TAG}..HEAD" --count else echo "No tag found, commitsSince will be 0" fi echo "" echo "=== fetch-depth check ===" git rev-parse --is-shallow-repository - name: Set up Node uses: actions/setup-node@v4 with: node-version: lts/* - name: Install dependencies run: npm ci - name: Build run: npm run build - name: Setup Pages uses: actions/configure-pages@v5 - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: path: dist/app - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4