-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
101 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,75 +45,75 @@ jobs: | |
REPO: ${{ github.repository }} | ||
BRANCH: ${{ github.event.repository.default_branch }} | ||
|
||
# publish-dev: | ||
# name: Build & Deploy TLGC (dev) 📖 | ||
# runs-on: ubuntu-latest | ||
# container: | ||
# image: ghcr.io/insightsengineering/rstudio:latest | ||
# needs: cache-refresh | ||
# if: ${{ always() }} | ||
# permissions: | ||
# contents: write | ||
# steps: | ||
# - name: Checkout repo 🛎 | ||
# uses: actions/[email protected] | ||
|
||
# - name: Cache artifacts 📀 | ||
# uses: actions/cache@v4 | ||
# with: | ||
# path: | | ||
# ~/package/.staged.dependencies | ||
# book/_freeze | ||
# key: ${{ runner.os }}-tlg-catalog-dev | ||
publish-dev: | ||
name: Build & Deploy TLGC (dev) 📖 | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/insightsengineering/rstudio:latest | ||
needs: cache-refresh | ||
if: github.event_name != 'push' | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout repo 🛎 | ||
uses: actions/[email protected] | ||
|
||
# - name: Normalize variables 📏 | ||
# run: | | ||
# echo "gchat_webhook=${{ secrets.GCHAT_WEBHOOK }}" >> $GITHUB_ENV | ||
# shell: bash | ||
- name: Cache artifacts 📀 | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/package/.staged.dependencies | ||
book/_freeze | ||
key: ${{ runner.os }}-tlg-catalog-dev | ||
|
||
# - name: Run Staged dependencies 🎦 | ||
# uses: insightsengineering/staged-dependencies-action@v1 | ||
# env: | ||
# GITHUB_PAT: ${{ secrets.REPO_GITHUB_TOKEN }} | ||
# with: | ||
# path: "./package" | ||
# enable-check: false | ||
# direction: upstream | ||
- name: Normalize variables 📏 | ||
run: | | ||
echo "gchat_webhook=${{ secrets.GCHAT_WEBHOOK }}" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
# - name: Render catalog 🖨 | ||
# run: | | ||
# quarto render --profile development | ||
# shell: bash | ||
# working-directory: book | ||
- name: Run Staged dependencies 🎦 | ||
uses: insightsengineering/staged-dependencies-action@v1 | ||
env: | ||
GITHUB_PAT: ${{ secrets.REPO_GITHUB_TOKEN }} | ||
with: | ||
path: "./package" | ||
enable-check: false | ||
direction: upstream | ||
|
||
# - name: Create artifact 📂 | ||
# if: startsWith(github.ref, 'refs/tags/v') | ||
# run: | | ||
# zip -r9 ../../site.zip * | ||
# shell: bash | ||
# working-directory: book/_site | ||
- name: Render catalog 🖨 | ||
run: | | ||
quarto render --profile development | ||
shell: bash | ||
working-directory: book | ||
|
||
# - name: Upload docs ⬆ | ||
# if: startsWith(github.ref, 'refs/tags/v') | ||
# uses: actions/upload-artifact@v4 | ||
# with: | ||
# name: site-development | ||
# path: site.zip | ||
- name: Create artifact 📂 | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
run: | | ||
zip -r9 ../../site.zip * | ||
shell: bash | ||
working-directory: book/_site | ||
|
||
# - name: Publish docs 📔 | ||
# uses: peaceiris/actions-gh-pages@v3 | ||
# with: | ||
# github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# publish_dir: ./book/_site | ||
# destination_dir: development | ||
- name: Upload docs ⬆ | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: site-development | ||
path: site.zip | ||
|
||
# - name: GChat notification 🔔 | ||
# if: (failure() || cancelled()) && env.gchat_webhook != '' | ||
# uses: insightsengineering/google-chat-notification@master | ||
# with: | ||
# name: ${{ github.event.repository.name }} - development | ||
# url: ${{ secrets.GCHAT_WEBHOOK }} | ||
# status: ${{ job.status }} | ||
- name: Publish docs 📔 | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./book/_site | ||
destination_dir: development | ||
|
||
- name: GChat notification 🔔 | ||
if: (failure() || cancelled()) && env.gchat_webhook != '' | ||
uses: insightsengineering/google-chat-notification@master | ||
with: | ||
name: ${{ github.event.repository.name }} - development | ||
url: ${{ secrets.GCHAT_WEBHOOK }} | ||
status: ${{ job.status }} | ||
|
||
publish-stable: | ||
name: Build & Deploy TLGC (stable) 📖 | ||
|
@@ -151,7 +151,7 @@ jobs: | |
- name: Install packages 🎦 | ||
run: | | ||
if (!require("pak")) install.packages("pak", upgrade = "never") | ||
pak::repo_add("R-universe" = "https://insightsengineering.r-universe.dev") # TODO to be removed | ||
pak::repo_add("R-universe" = "https://insightsengineering.r-universe.dev") | ||
pak::repo_get() | ||
pak::local_install_dev_deps(root = ".", upgrade = FALSE) | ||
shell: Rscript {0} | ||
|
@@ -192,43 +192,43 @@ jobs: | |
# url: ${{ secrets.GCHAT_WEBHOOK }} | ||
# status: ${{ job.status }} | ||
|
||
# upload-release-assets: | ||
# name: Upload assets 🔼 | ||
# needs: [publish-dev, publish-stable] | ||
# runs-on: ubuntu-latest | ||
# if: > | ||
# startsWith(github.ref, 'refs/tags/v') | ||
# && !contains(github.event.commits[0].message, '[skip docs]') | ||
# steps: | ||
# - name: Checkout repo 🛎 | ||
# uses: actions/[email protected] | ||
|
||
# - name: Download artifact ⏬ | ||
# uses: actions/download-artifact@v4 | ||
# with: | ||
# name: site-development | ||
# path: site-development | ||
upload-release-assets: | ||
name: Upload assets 🔼 | ||
needs: [publish-dev, publish-stable] | ||
runs-on: ubuntu-latest | ||
if: > | ||
startsWith(github.ref, 'refs/tags/v') | ||
&& !contains(github.event.commits[0].message, '[skip docs]') | ||
steps: | ||
- name: Checkout repo 🛎 | ||
uses: actions/[email protected] | ||
|
||
# - name: Download artifact ⏬ | ||
# uses: actions/download-artifact@v4 | ||
# with: | ||
# name: site-stable | ||
# path: site-stable | ||
- name: Download artifact ⏬ | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: site-development | ||
path: site-development | ||
|
||
# - name: Upload binaries to release ⤴ | ||
# uses: svenstaro/upload-release-action@v2 | ||
# with: | ||
# repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
# file: site-development/site.zip | ||
# asset_name: catalog-development.zip | ||
# tag: ${{ github.ref }} | ||
# overwrite: true | ||
|
||
# - name: Upload binaries to release ⤴ | ||
# uses: svenstaro/upload-release-action@v2 | ||
# with: | ||
# repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
# file: site-stable/site.zip | ||
# asset_name: catalog-stable.zip | ||
# tag: ${{ github.ref }} | ||
# overwrite: true | ||
- name: Download artifact ⏬ | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: site-stable | ||
path: site-stable | ||
|
||
- name: Upload binaries to release ⤴ | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: site-development/site.zip | ||
asset_name: catalog-development.zip | ||
tag: ${{ github.ref }} | ||
overwrite: true | ||
|
||
- name: Upload binaries to release ⤴ | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: site-stable/site.zip | ||
asset_name: catalog-stable.zip | ||
tag: ${{ github.ref }} | ||
overwrite: true |