Skip to content

Merge pull request #133 from github/dg/actions-permissions #26

Merge pull request #133 from github/dg/actions-permissions

Merge pull request #133 from github/dg/actions-permissions #26

Workflow file for this run

name: Publish Pages site
on:
push:
branches:
- main
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm install
- run: npm run buildSite
- name: Fix permissions
run: |
chmod -c -R +rX "pages/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- uses: actions/upload-pages-artifact@v2
with:
path: pages
deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- id: deployment
uses: actions/deploy-pages@v2