Skip to content

Commit

Permalink
edit deploy document
Browse files Browse the repository at this point in the history
  • Loading branch information
ernestguevarra committed Nov 18, 2024
1 parent b30489a commit f9683c5
Showing 1 changed file with 36 additions and 24 deletions.
60 changes: 36 additions & 24 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,51 @@
name: deploy document

on:
workflow_dispatch:
push:
branches: main

name: Quarto Publish
branches: [main, master]
workflow_dispatch:

jobs:
build-deploy:
deploy-document:
runs-on: ubuntu-latest
permissions:
contents: write
container: rocker/tidyverse:4.4.2
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check out repository
uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Install system dependencies
run: |
apt-get update && apt-get install -y --no-install-recommends \
libxt6 libglpk-dev gh curl jq rsync
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tinytex: true

- name: Install R
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.4.2'
tinytex: true

# - name: Install tinytex
# run: quarto install tinytex

- name: Install R Dependencies
- name: Install packages from renv.lock (with cache)
if: ${{ !env.ACT }}
uses: r-lib/actions/setup-renv@v2
with:
cache-version: 1
cache-version: 2

- name: Install packages from renv.lock (local, no cache)
if: ${{ env.ACT }}
run: |
renv::restore()
shell: Rscript {0}

- name: Run workflow
run: |
targets::tar_make(ferc_scoping_review_report)
shell: Rscript {0}

- name: Render and Publish
uses: quarto-dev/quarto-actions/publish@v2
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
folder: docs

0 comments on commit f9683c5

Please sign in to comment.