Skip to content

Commit

Permalink
Run docs-ci only on the current default branch
Browse files Browse the repository at this point in the history
This avoids that outdated docs are published by pushing to older
branches.
  • Loading branch information
lukellmann committed Mar 25, 2023
1 parent 66891ba commit 98181ac
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/docs-ci.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
# This workflow will build and deploy docs to GitHub Pages whenever something is pushed to 0.8.x
# This workflow will build and deploy docs to GitHub Pages whenever something is pushed to the default branch

name: Docs

on:
push:
branches:
- 0.8.x
on: push # but only to default branch, see if below

permissions:
contents: write

# Allow one concurrent deployment
concurrency:
group: pages
cancel-in-progress: true

jobs:
docs:
name: Build and deploy docs
runs-on: ubuntu-latest
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
concurrency: # Allow one concurrent deployment
group: pages
cancel-in-progress: true
env:
GITHUB_TAG_NAME: ${{ github.event.release.tag_name }}
GITHUB_BRANCH_NAME: ${{ github.ref }}
Expand Down

0 comments on commit 98181ac

Please sign in to comment.