Skip to content

build(deps): bump the docs-dependencies group in /docs with 4 updates… #857

build(deps): bump the docs-dependencies group in /docs with 4 updates…

build(deps): bump the docs-dependencies group in /docs with 4 updates… #857

Workflow file for this run

# .github/workflows/preview.yml
name: Deploy Github Pages
on:
push:
branches:
- main
paths:
- "docs/**"
- ".github/workflows/publish-page.yml"
pull_request:
types:
- opened
- reopened
- synchronize
- closed
paths:
- "docs/**"
- ".github/workflows/publish-page.yml"
permissions:
contents: write
pull-requests: write
concurrency: ci-${{ github.ref }}
jobs:
publish:
# Do not run this on forks:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'grafana/tanka'
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Install pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
version: 9
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: 20
cache: 'pnpm'
cache-dependency-path: 'docs'
- name: Install and Build
working-directory: docs
env:
# Main: https://tanka.dev/
# PRs: https://tanka.dev/pr-preview/pr-{number}/
PATH_PREFIX: "${{ github.event_name == 'pull_request' && format('/pr-preview/pr-{0}/', github.event.number) || '' }}"
run: |
pnpm install
pnpm build
if [ -d "./public" ]; then
touch ./public/.nojekyll
fi
if [ -d "./dist" ]; then
touch ./dist/.nojekyll
fi
- name: Deploy main
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@920cbb300dcd3f0568dbc42700c61e2fd9e6139c # v4.6.4
with:
clean-exclude: pr-preview/
folder: ./docs/dist/
- name: Deploy preview
if: github.event_name == 'pull_request'
uses: rossjrw/pr-preview-action@f31d5aa7b364955ea86228b9dcd346dc3f29c408 # v1.4.7
with:
deploy-repository: ${{ github.event.pull_request.head.repo.full_name }}
source-dir: ./docs/dist/