set pages perms to write #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
name: CI | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the "main" branch | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Allow commits to the repository | |
permissions: | |
id-token: write | |
contents: write | |
pages: write | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
- name: Setup Deno environment | |
# Downloads deno and caches it | |
uses: denoland/setup-deno@v2 | |
with: | |
# Latest Deno 2.x version | |
deno-version: v2.x | |
- name: Build site | |
# Run the build script from deno.json | |
run: deno task build | |
- name: Commit changes | |
# Commit the changes to the repository | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: Apply changes during gh actions build | |
status_options: '--untracked-files=no' | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: "_site" | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |