Skip to content

Commit

Permalink
Use GitHub Actions site deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewfeickert authored Jul 4, 2024
1 parent 58cabcf commit 9650a50
Showing 1 changed file with 39 additions and 6 deletions.
45 changes: 39 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
name: Quarto Publish

jobs:
build-deploy:
build:
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -27,9 +27,42 @@ jobs:
with:
cache-version: 1

- name: Render and Publish
uses: quarto-dev/quarto-actions/publish@v2
- name: Render Quarto Project
uses: quarto-dev/quarto-actions/render@v2
with:
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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

0 comments on commit 9650a50

Please sign in to comment.