Skip to content

Commit

Permalink
ci: add permissions to deploy docs to gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed Oct 21, 2023
1 parent 5365be5 commit b16b5eb
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ on:
push:
paths: ['**/*.md', '**/docs.yml']
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

env:
REPO_NAME: ${{ github.event.repository.name }}
Expand All @@ -32,9 +35,12 @@ jobs:
fi
check-docs:
runs-on: ubuntu-latest
needs: debounce
if: needs.debounce.outputs.abort != 'true'
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Restore Cache
id: cache-status
Expand Down Expand Up @@ -63,11 +69,11 @@ jobs:
run: v check-md -hide-warnings ${{ env.MOD_PATH }}

deploy:
if: github.ref_name == 'main' && github.event_name == 'push'
runs-on: ubuntu-latest
concurrency:
group: pages
cancel-in-progress: false
runs-on: ubuntu-latest
if: github.ref_name == 'main' && github.event_name == 'push'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down

0 comments on commit b16b5eb

Please sign in to comment.