Skip to content

Workflow permissions added #7

Workflow permissions added

Workflow permissions added #7

Workflow file for this run

name: Publish on GitHub Pages
on:
push:
branches: [ main ]
permissions:
contents: read
pages: write
id-token: write
contents: write

Check failure on line 12 in .github/workflows/gh-pages.yml

View workflow run for this annotation

GitHub Actions / Publish on GitHub Pages

Invalid workflow file

The workflow is not valid. .github/workflows/gh-pages.yml (Line: 12, Col: 3): 'contents' is already defined
pull-requests: write
jobs:
build:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout Documents
uses: actions/checkout@v4
with:
repository: robstarbuck/documents
path: src/documents
- name: Checkout Content
uses: actions/checkout@v4
with:
repository: robstarbuck/content.robstarbuck.uk
path: src/content.robstarbuck.uk
- name: Setup Deno environment
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Build site
run: deno task build
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: '_site'
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_site