Skip to content

Use GitHub Actions site deployment #1

Use GitHub Actions site deployment

Use GitHub Actions site deployment #1

Workflow file for this run

on:
workflow_dispatch:
push:
branches: main
name: Quarto Publish
jobs:
build:

Check failure on line 9 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/publish.yml

Invalid workflow file

You have an error in your yaml syntax on line 9
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Install R
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.4.0'
- name: Install R Dependencies
uses: r-lib/actions/setup-renv@v2
with:
cache-version: 1
- name: Render Quarto Project
uses: quarto-dev/quarto-actions/render@v2
with:
to: html
- name: Fix permissions if needed
run: |
chmod -c -R +rX "html/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'html/'
deploy:
name: Deploy docs to GitHub Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: build
# Set permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4