Skip to content

Add permissions on GitHub action for documentation #2

Add permissions on GitHub action for documentation

Add permissions on GitHub action for documentation #2

Workflow file for this run

name: website
on:
push:
branches: [ main ]
permissions:
contents: read
pages: write
id-token: write
jobs:
publish:
runs-on: ubuntu-latest
container:
image: crystallang/crystal
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: shards install
- name: Generate documentation
run: crystal docs
-
name: Deploy to GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v4
with:
target_branch: gh-pages
build_dir: docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}