Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 1 addition & 8 deletions .Renviron.example
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
APP_VERSION=dev
AZ_STORAGE_CONTAINER=inputs-data
AZ_STORAGE_EP=
AZ_STORAGE_KEY=
ENABLE_AUTO_RECONNECT=FALSE
LOCAL_STORAGE_EP=
LOCAL_STORAGE_KEY=
NHP_API_URI=
NHP_API_KEY=
NHP_APP_VERSION=dev
NHP_ENCRYPT_KEY=
NHP_OUTPUTS_URI=https://connect.strategyunitwm.nhs.uk/nhp/{version}/outputs/
CACHE_VERSION=
FEEDBACK_FORM_URL=
YEAR_HORIZON_DEFAULT=2041
YEAR_HORIZON_MAX=2043
YEAR_BASELINE_DEFAULT=2024
YEAR_BASELINE_MIN=2023
CACHE_VERSION=
38 changes: 26 additions & 12 deletions .github/workflows/connect-publish-manual.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@ on:
environment:
description: "The environment to deploy to"
required: true
type: choice
default: "production"
options:
- "production"
- "development"
type: string
default: "development"
workflow_call:
inputs:
namespace:
Expand All @@ -28,32 +25,49 @@ on:
description: "The environment to deploy to"
required: true
type: string
default: "production"

jobs:
connect-publish:
name: "Connect Publish: ${{ inputs.namespace }} [${{ inputs.environment }}]"
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
environment:
name: ${{ inputs.environment }}
url: ${{ vars.RSCONNECT_URL }}nhp/${{ inputs.namespace }}/inputs

steps:
- uses: actions/checkout@v6

- name: Update manifest.json
run: node update_manifest.js
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 1
extra-packages: |
any::rsconnect
any::cpp11
any::fs
any::progress
- name: Generate manifest
run: Rscript dev/generate_manifest.R

- name: Upload manifest
uses: actions/upload-artifact@v7
with:
name: manifest
path: manifest.json

- name: Publish Connect content
uses: rstudio/actions/connect-publish@main
env:
CONNECT_ENV_SET_AZ_STORAGE_CONTAINER: ${{ secrets.AZ_STORAGE_CONTAINER }}
CONNECT_ENV_SET_AZ_STORAGE_EP: ${{ secrets.AZ_STORAGE_EP }}
CONNECT_ENV_SET_NHP_API_KEY: ${{ secrets.NHP_API_KEY }}
CONNECT_ENV_SET_NHP_API_URI: ${{ secrets.NHP_API_URI }}
CONNECT_ENV_SET_NHP_ENCRYPT_KEY: ${{ secrets.NHP_ENCRYPT_KEY }}
CONNECT_ENV_SET_NHP_API_URI: ${{ vars.NHP_API_URI }}
CONNECT_ENV_SET_NHP_INPUTS_DATA_VERSION: ${{ inputs.inputs_data_version }}
CONNECT_ENV_SET_NHP_OUTPUTS_URI: ${{ secrets.NHP_OUTPUTS_URI }}
CONNECT_ENV_SET_FEEDBACK_FORM_URL: ${{ secrets.FEEDBACK_FORM_URL }}
CONNECT_ENV_SET_GOLEM_CONFIG_ACTIVE: "production"
Comment thread
tomjemmett marked this conversation as resolved.
with:
url: ${{ secrets.RSCONNECT_URL }}
url: ${{ vars.RSCONNECT_URL }}
api-key: ${{ secrets.RSCONNECT_API_KEY }}
access-type: logged_in
force: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/connect-publish-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
with:
namespace: ${{ needs.get-variables.outputs.NAMESPACE }}
inputs_data_version: ${{ needs.get-variables.outputs.INPUTS_DATA_VERSION }}
environment: "production"
environment: "production (${{ needs.get-variables.outputs.NAMESPACE }})"
secrets: inherit

sync-data:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sync-data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: "Sync Data"
# This action uses OIDC federated credentials for authenticating with Azure.
#
# In Azure there is a managed identity which has been created and is set to allow federated
# credentials from this repo when the environment is "production".
# credentials from this repo when the environment is "sync-data".
#
# That managed identity has been granted Storage Blob Data Contributor role to the storage account
# which is being synced with azcopy.
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
sync-data:
name: "Sync Data"
runs-on: ubuntu-latest
environment: production
environment: sync-data

Comment thread
tomjemmett marked this conversation as resolved.
steps:
- name: Azure Login
Expand Down
2 changes: 0 additions & 2 deletions dev/generate_manifest.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@ files <- c(
)

rsconnect::writeManifest(appFiles = files)

system("node remove_files_from_manifest.js")
4,463 changes: 0 additions & 4,463 deletions manifest.json

This file was deleted.

5 changes: 0 additions & 5 deletions remove_files_from_manifest.js

This file was deleted.

32 changes: 0 additions & 32 deletions update_manifest.js

This file was deleted.