Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stable release channel for TLG catalog #122

Merged
merged 41 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
c5a6df9
Add stable TLG catalog
walkowif Sep 18, 2023
519da66
Fix
walkowif Sep 18, 2023
55f5d5d
Add packages
walkowif Sep 18, 2023
a0f90dc
Quarto render verbose
walkowif Sep 18, 2023
30e47c7
Add packages
walkowif Sep 18, 2023
0251882
Change package installation
walkowif Sep 18, 2023
28753cb
Update
walkowif Sep 18, 2023
b3f4b81
Update
walkowif Sep 18, 2023
f087eb3
Update
walkowif Sep 18, 2023
8cd6faf
Update
walkowif Sep 18, 2023
f21a939
Update
walkowif Sep 18, 2023
c3f6faa
Refactor
walkowif Sep 19, 2023
e19b757
Update
walkowif Sep 19, 2023
d89e478
Updates
walkowif Sep 19, 2023
ad39b40
More updates
walkowif Sep 19, 2023
c9eef07
Merge branch 'stable-tlg-catalog' of github.com:insightsengineering/t…
walkowif Sep 19, 2023
5753568
Update
walkowif Sep 21, 2023
fd757ef
Merge branch 'main' into stable-tlg-catalog
walkowif Sep 25, 2023
7f56518
Comment
walkowif Sep 25, 2023
a6771e5
Update
walkowif Sep 25, 2023
6c10b19
Use quarto profiles
walkowif Sep 26, 2023
91fb284
Merge branch 'main' into stable-tlg-catalog
walkowif Sep 26, 2023
d45960b
Comment
walkowif Sep 26, 2023
deedd60
Comment
walkowif Sep 26, 2023
4e3f006
Test
walkowif Sep 26, 2023
c97304f
Comment
walkowif Sep 26, 2023
7b8ebe9
Comment
walkowif Sep 26, 2023
2b5caf6
Add GChat notification
walkowif Sep 27, 2023
cae9be6
Apply suggestions from code review
walkowif Sep 28, 2023
801a15e
Merge branch 'stable-tlg-catalog' of github.com:insightsengineering/t…
walkowif Sep 28, 2023
31faf63
Update
walkowif Sep 28, 2023
f107521
Update installation method
walkowif Sep 28, 2023
930d990
Update
walkowif Sep 28, 2023
332eec9
Fixes
walkowif Sep 28, 2023
7fa4c25
Update drop-down
walkowif Sep 28, 2023
1630cea
Update website title
walkowif Sep 28, 2023
7222155
Restore files from main
walkowif Oct 5, 2023
8bfed07
Fixes
walkowif Oct 5, 2023
6343f6e
Test navbar fix
walkowif Oct 5, 2023
13067df
Rename file
walkowif Oct 5, 2023
716223a
Rename file
walkowif Oct 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 116 additions & 16 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,25 @@ name: Publish Catalog 📰

on:
workflow_call:
secrets:
REPO_GITHUB_TOKEN:
description: |
Github token with write access to the repository
required: false
GCHAT_WEBHOOK:
description: |
Google Chat webhook to send failure notifications
required: false
workflow_dispatch:
push:
tags:
- "v*"
branches:
- main
schedule:
- cron: "17 17 * * 3,6"

jobs:
publish:
name: Build & Deploy TLGC 📖
publish-dev:
name: Build & Deploy TLGC (dev) 📖
runs-on: ubuntu-latest
container:
image: ghcr.io/insightsengineering/rstudio_4.3.1_bioc_3.17:latest
Expand All @@ -30,7 +37,12 @@ jobs:
path: |
~/package/.staged.dependencies
book/_freeze
key: ${{ runner.os }}-tlg-catalog
key: ${{ runner.os }}-tlg-catalog-dev

- name: Normalize variables 📏
run: |
echo "gchat_webhook=${{ secrets.GCHAT_WEBHOOK }}" >> $GITHUB_ENV
shell: bash

- name: Run Staged dependencies 🎦
uses: insightsengineering/staged-dependencies-action@v1
Expand All @@ -43,34 +55,106 @@ jobs:

- name: Render catalog 🖨
run: |
cd book
quarto render
quarto render --profile development
shell: bash
working-directory: book

- name: Create artifact 📂
if: startsWith(github.ref, 'refs/tags/v')
run: |
zip -r9 ../../site.zip *
shell: bash
working-directory: book/_site

- name: Upload docs ⬆
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/upload-artifact@v3
with:
name: site-development
path: site.zip

- 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) 📖
runs-on: ubuntu-latest
container:
image: ghcr.io/insightsengineering/rstudio_4.3.1_bioc_3.17:latest
permissions:
contents: write
steps:
- name: Checkout repo 🛎
uses: actions/checkout@v3

- name: Cache artifacts 📀
uses: actions/cache@v3
with:
path: |
book/_freeze
key: ${{ runner.os }}-tlg-catalog-stable

- name: Normalize variables 📏
run: |
echo "gchat_webhook=${{ secrets.GCHAT_WEBHOOK }}" >> $GITHUB_ENV
shell: bash

- name: Install packages 🎦
run: |
devtools::install_dev_deps(".", repos = c("https://insightsengineering.r-universe.dev/", "https://cloud.r-project.org/"))
shell: Rscript {0}
working-directory: package

- name: Render catalog 🖨
run: |
quarto render --profile stable
shell: bash
walkowif marked this conversation as resolved.
Show resolved Hide resolved
working-directory: book

- name: Create artifact 📂
if: startsWith(github.ref, 'refs/tags/v')
run: |
pushd book/_site
zip -r9 $OLDPWD/site.zip *
popd
zip -r9 ../../site.zip *
shell: bash
working-directory: book/_site

- name: Upload docs ⬆
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/upload-artifact@v3
with:
name: site.zip
name: site-stable
path: site.zip

- name: Publish docs
- name: Publish docs 📔
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book/_site
destination_dir: stable

- name: GChat notification 🔔
if: (failure() || cancelled()) && env.gchat_webhook != ''
uses: insightsengineering/google-chat-notification@master
with:
name: ${{ github.event.repository.name }} - stable
url: ${{ secrets.GCHAT_WEBHOOK }}
status: ${{ job.status }}

upload-release-assets:
name: Upload assets 🔼
needs: publish
needs: [publish-dev, publish-stable]
runs-on: ubuntu-latest
if: >
startsWith(github.ref, 'refs/tags/v')
Expand All @@ -82,13 +166,29 @@ jobs:
- name: Download artifact ⏬
uses: actions/download-artifact@v3
with:
name: site.zip
name: site-development
path: site-development

- name: Download artifact ⏬
uses: actions/download-artifact@v3
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.zip
asset_name: catalog.zip
file: site-stable/site.zip
asset_name: catalog-stable.zip
tag: ${{ github.ref }}
overwrite: true
7 changes: 6 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@ jobs:
docs:
name: Docs 📚
needs: release
uses: ./.github/workflows/docs.yaml
uses: ./.github/workflows/docs.yml
secrets:
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
GCHAT_WEBHOOK: ${{ secrets.GCHAT_WEBHOOK }}
release:
name: Create release 🎉
uses: insightsengineering/r.pkg.template/.github/workflows/release.yaml@main
with:
package-subdirectory: package
permissions:
contents: write
14 changes: 14 additions & 0 deletions book/_quarto-development.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
website:
title: TLG Catalog - Dev
navbar:
right:
- text: "Dev"
menu:
- text: "Stable"
href: "https://insightsengineering.github.io/tlg-catalog/stable"
- icon: slack
href: https://app.slack.com/client/T028PB489D3/
aria-label: Slack
- icon: github
href: https://github.com/insightsengineering/tlg-catalog
aria-label: Repository
14 changes: 14 additions & 0 deletions book/_quarto-stable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
website:
title: TLG Catalog - Stable
navbar:
right:
- text: "Stable"
menu:
- text: "Dev"
href: "https://insightsengineering.github.io/tlg-catalog/development"
- icon: slack
href: https://app.slack.com/client/T028PB489D3/
aria-label: Slack
- icon: github
href: https://github.com/insightsengineering/tlg-catalog
aria-label: Repository
7 changes: 0 additions & 7 deletions book/_quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,6 @@ website:
collapse: false
background: primary
search: true
right:
- icon: slack
href: https://app.slack.com/client/T028PB489D3/
aria-label: Slack
- icon: github
href: https://github.com/insightsengineering/tlg-catalog
aria-label: Repository
sidebar:
- id: sidebar
style: docked
Expand Down
Loading