Skip to content

Commit bb2ba99

Browse files
authored
Merge pull request #235 from cmu-delphi/release
Release v1.12.5
2 parents c249882 + 5007db1 commit bb2ba99

File tree

94 files changed

+262399
-8060
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+262399
-8060
lines changed

.github/workflows/ci.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
${{ runner.os }}-conda6-
2525
- uses: conda-incubator/setup-miniconda@v2
2626
with:
27-
python-version: 3.7
27+
python-version: 3.9
2828
mamba-version: "*"
2929
channels: conda-forge,defaults
3030
channel-priority: true
@@ -46,14 +46,22 @@ jobs:
4646
with:
4747
path: |
4848
./blogdown
49-
key: ${{ runner.os }}-blogdown2-${{ hashFiles('content/blog/**.Rmd') }}
49+
key: ${{ runner.os }}-blogdown2-${{ hashFiles('environment.yml') }}-${{ hashFiles('content/blog/**.Rmd') }}
5050
restore-keys: |
51+
${{ runner.os }}-blogdown2-${{ hashFiles('environment.yml') }}-
5152
${{ runner.os }}-blogdown2-
5253
- name: Build site
5354
shell: bash -l {0}
5455
run: |
5556
npm run build:blog
5657
58+
- uses: actions/upload-artifact@v2
59+
with:
60+
name: blog
61+
path: |
62+
./content/blog
63+
./static/blog
64+
5765
- uses: actions/setup-node@v1
5866
with:
5967
node-version: "12"

.github/workflows/ci_fast.yaml

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -36,38 +36,33 @@ jobs:
3636
name: website
3737
path: ./public
3838

39-
- name: Configure AWS credentials
40-
uses: aws-actions/configure-aws-credentials@v1
39+
- name: Login to GitHub Container Registry
40+
uses: docker/login-action@v1
4141
with:
42-
aws-access-key-id: ${{ secrets.DELPHI_ECR_ACCESS_ID }}
43-
aws-secret-access-key: ${{ secrets.DELPHI_ECR_ACCESS_KEY }}
44-
aws-region: us-east-1
42+
registry: ghcr.io
43+
username: cmu-delphi-deploy-machine
44+
password: ${{ secrets.CMU_DELPHI_DEPLOY_MACHINE_PAT }}
4545

46-
- name: Login to Amazon ECR
47-
id: login-ecr
48-
uses: aws-actions/amazon-ecr-login@v1
49-
50-
- name: Build, tag, and push image to Amazon ECR
46+
- name: Build, tag, and push image to Github
5147
env:
52-
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
53-
ECR_REPOSITORY: ${{ github.event.repository.name }}
48+
DEVOPS_DOCKER_FILE: ./devops/precompiled.dockerfile
5449
run: |
5550
baseRef="${GITHUB_REF#*/}"
5651
baseRef="${baseRef#*/}"
5752
case "${baseRef}" in
5853
main)
59-
awsTag="latest"
54+
imageTag="latest"
6055
;;
6156
*)
62-
awsTag="${baseRef//\//_}" # replace `/` with `_` in branch name
57+
imageTag="${baseRef//\//_}" # replace `/` with `_` in branch name
6358
;;
6459
esac
65-
echo "using tag: --${awsTag}--"
66-
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$awsTag --file ./devops/precompiled/Dockerfile .
67-
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$awsTag
60+
echo "using tag: --${imageTag}--"
61+
docker build -t ghcr.io/${{ github.repository }}:$imageTag --file ${DEVOPS_DOCKER_FILE} .
62+
docker push ghcr.io/${{ github.repository }}:$imageTag
6863
6964
# trigger a webhook update
7065
curl -H "Authorization: Bearer ${{ secrets.DELPHI_DEPLOY_WEBHOOK_TOKEN }}" \
7166
-X POST ${{ secrets.DELPHI_DEPLOY_WEBHOOK_URL }} \
7267
-H "Content-Type: application/x-www-form-urlencoded" \
73-
-d "repository=$ECR_REGISTRY/$ECR_REPOSITORY&tag=$awsTag"
68+
-d "repository=ghcr.io/${{ github.repository }}&tag=$imageTag"

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@
1111
/assets/jsconfig.json
1212
/static/uikit/**
1313
.DS_Store
14+
*.zip
15+
*.tgz

.gitpod.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
image:
2+
file: ./devops/gitpod.dockerfile
3+
tasks:
4+
- init: npm install && RScript -e "blogdown::install_hugo()"
5+
- command: 'echo ''run: "npm start" or "npm run start:blog"'''
6+
ports:
7+
- port: 1313
8+
vscode:
9+
extensions:
10+
- [email protected]:SrD06skfmg05hLAerl2aKQ==

.prettierignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,7 @@
2929
*.md
3030
*.jpeg
3131
*.ico
32-
/themes/delphi/layouts/partials/webp-image.html
32+
*.bib
33+
/themes/delphi/layouts/partials/webp-image.html
34+
/themes/delphi/layouts/shortcodes/apireflink.html
35+
/themes/delphi/layouts/shortcodes/reflink.html

.release-it.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"hooks": {
3+
"before:init": "npm run lint",
4+
"before:release": "npm run build && npm run zip",
5+
"after:release": "echo Successfully released ${name} v${version}."
6+
},
7+
"git": {
8+
"tagName": "v${version}"
9+
},
10+
"npm": {
11+
"publish": false
12+
},
13+
"github": {
14+
"release": true,
15+
"assets": ["website.zip"]
16+
}
17+
}

README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Delphi Website
22

3+
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/cmu-delpih/www-main)
4+
5+
36
Delphi's homepage at https://cmu-delphi-main.netlify.app/
47

58
This site is based on [Hugo](https://gohugo.io) and uses [Prettier](https://prettier.io) for formatting.
@@ -38,9 +41,9 @@ In RMarkdown things are slightly more different since the R Markdown parser is u
3841
**Examples**
3942

4043
```
41-
[Facebook](`r blogdown::shortcode_html("ref", "2020-08-26-fb-survey")`)
42-
[previous exploratory investigations](`r blogdown::shortcode_html("ref", "2020-08-26-fb-survey#some-interesting-examples")`)
43-
[public API](`r blogdown::shortcode_html("apiref", "api/covidcast.html")`)
44+
`r blogdown::shortcode_html("reflink", "2020-08-26-fb-survey", "Facebook")`
45+
`r blogdown::shortcode_html("reflink", "2020-08-26-fb-survey#some-interesting-examples", "previous exploratory investigations")`
46+
`r blogdown::shortcode_html("apireflink", "api/covidcast.html", "public API")`
4447
4548
```
4649

@@ -53,6 +56,8 @@ In addition, there in the `/data` directory there are the following listings in
5356

5457
## Development Environment
5558

59+
One click: [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/cmu-delpih/www-main)
60+
5661
### Web Editor Only
5762

5863
1. Install Node: https://nodejs.org/en/download/
@@ -98,3 +103,16 @@ In case you use new dependencies don't forget to either edit `environment.yml` o
98103
A Github action should runs when Rmd files changes so it will verify that the blog post can be built.
99104
However, the converted HTML file along with all generated images are committed to the repository.
100105
This simplifies the deployment and ensures that we have a blog post even when the API or data changes.
106+
107+
108+
### Release Process
109+
110+
The release process is based on [release-it](https://github.com/release-it/release-it). To create a release, run
111+
112+
1. create/checkout the release branch `release` and push to origin
113+
1. run `npm run release` and publish the release
114+
1. create a PR that merges the `release` branch in the `main` branch
115+
1. create a PR that merges the `main` branch back into the `dev` branch
116+
117+
Then go to the release page and update short description of the changes made.
118+

content/blog/2015-07-23-template-post.Rmd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ tags:
99
draft: true # remove this line in new blog posts
1010
authors: # list of author keys, see /data/authors.yaml
1111
- frida
12-
heroImage: /blog/images/blog-lg-img_hello-world.jpg
13-
heroImageThumb: /blog/images/blog-thumb-img_hello-world.jpg
12+
heroImage: /blog/images/blog-lg-img_hello-world.jpg # size: 1120x440 jpg and webp format
13+
heroImageThumb: /blog/images/blog-thumb-img_hello-world.jpg # size: 300x200 jpg and webp format
1414
summary: |
1515
Blog summary, the first 150 characters are used for the blog list
1616
acknowledgements: |
@@ -110,12 +110,12 @@ suggest we consider the following tags as base tags:
110110

111111
### Linking to other pages and blog posts:
112112

113-
using the file name and the Hugo shortcodes, e.g.: [Facebook Post](`r blogdown::shortcode_html("relref", "2020-08-26-fb-survey")`).
113+
using the file name and the Hugo shortcodes, e.g.: `r blogdown::shortcode_html("reflink", "2020-08-26-fb-survey", "Facebook Post")`.
114114
Jumping to a specific section/anchor is supported too:
115-
[previous exploratory investigations](`r blogdown::shortcode_html("relref", "2020-08-26-fb-survey#some-interesting-examples")`)
115+
`r blogdown::shortcode_html("reflink", "2020-08-26-fb-survey#some-interesting-examples", "previous exploratory investigations")`
116116

117117
### Linking to the API doc:
118118

119119
there is another shortcode for creating an api link, e.g.
120-
[public API](`r blogdown::shortcode_html("apiref", "/")`) or
121-
[Doctor's Visits signal](`r blogdown::shortcode_html("apiref", "api/covidcast-signals/doctor-visits.html")`)
120+
`r blogdown::shortcode_html("apireflink", "/", "public API")` or
121+
`r blogdown::shortcode_html("apireflink", "api/covidcast-signals/doctor-visits.html", "Doctor's Visits signal")`

content/blog/2015-07-23-template-post.html

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
---
2424

2525
<script src="/rmarkdown-libs/header-attrs/header-attrs.js"></script>
26-
<link href="/rmarkdown-libs/anchor-sections/anchor-sections.css" rel="stylesheet" />
27-
<script src="/rmarkdown-libs/anchor-sections/anchor-sections.js"></script>
2826

2927
<div id="TOC">
3028
<ul>
@@ -49,21 +47,21 @@
4947
see <a href="http://rmarkdown.rstudio.com" class="uri">http://rmarkdown.rstudio.com</a>.</p>
5048
<p>You can embed an R code chunk like this:</p>
5149
<pre class="r"><code>summary(cars)
52-
## speed dist
53-
## Min. : 4.0 Min. : 2.00
54-
## 1st Qu.:12.0 1st Qu.: 26.00
55-
## Median :15.0 Median : 36.00
56-
## Mean :15.4 Mean : 42.98
57-
## 3rd Qu.:19.0 3rd Qu.: 56.00
50+
## speed dist
51+
## Min. : 4.0 Min. : 2.00
52+
## 1st Qu.:12.0 1st Qu.: 26.00
53+
## Median :15.0 Median : 36.00
54+
## Mean :15.4 Mean : 42.98
55+
## 3rd Qu.:19.0 3rd Qu.: 56.00
5856
## Max. :25.0 Max. :120.00
5957
fit &lt;- lm(dist ~ speed, data = cars)
6058
fit
61-
##
59+
##
6260
## Call:
6361
## lm(formula = dist ~ speed, data = cars)
64-
##
62+
##
6563
## Coefficients:
66-
## (Intercept) speed
64+
## (Intercept) speed
6765
## -17.579 3.932</code></pre>
6866
<div id="including-plots" class="section level2">
6967
<h2>Including Plots</h2>
@@ -142,14 +140,14 @@ <h3>Tags</h3>
142140
<h2>Linking</h2>
143141
<div id="linking-to-other-pages-and-blog-posts" class="section level3">
144142
<h3>Linking to other pages and blog posts:</h3>
145-
<p>using the file name and the Hugo shortcodes, e.g.: <a href="{{< relref "2020-08-26-fb-survey" >}}">Facebook Post</a>.
143+
<p>using the file name and the Hugo shortcodes, e.g.: {{< reflink "2020-08-26-fb-survey" "Facebook Post" >}}.
146144
Jumping to a specific section/anchor is supported too:
147-
<a href="{{< relref "2020-08-26-fb-survey#some-interesting-examples" >}}">previous exploratory investigations</a></p>
145+
{{< reflink "2020-08-26-fb-survey#some-interesting-examples" "previous exploratory investigations" >}}</p>
148146
</div>
149147
<div id="linking-to-the-api-doc" class="section level3">
150148
<h3>Linking to the API doc:</h3>
151149
<p>there is another shortcode for creating an api link, e.g. 
152-
<a href="{{< apiref "/" >}}">public API</a> or
153-
<a href="{{< apiref "api/covidcast-signals/doctor-visits.html" >}}">Doctors Visits signal</a></p>
150+
{{< apireflink "/" "public API" >}} or
151+
{{< apireflink "api/covidcast-signals/doctor-visits.html" "Doctor's Visits signal" >}}</p>
154152
</div>
155153
</div>

content/blog/2020-08-10-hello-world.Rmd

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ and making headway into dengue and norovirus.
5959
To learn about the work our group has done in the past,
6060
including some papers we've written, software tools we've built,
6161
and the real-time epidemiological data server we've been deploying since 2016,
62-
check out [our website](`r blogdown::shortcode("ref", "/")`).
62+
check out `r blogdown::shortcode_html("reflink", "/", "our website")`.
6363

6464
When the COVID-19 pandemic arrived, we focused all our attention on it.
6565
Our Delphi team
@@ -70,7 +70,7 @@ including Stanford, UC Davis, and USC, and also from industry.
7070
The pace has been intense and dizzying at times,
7171
and we're infinitely grateful for the contributions
7272
and commitment of all our new members---we'd be nowhere without them.
73-
See [here](`r blogdown::shortcode("ref", "team")`)
73+
See `r blogdown::shortcode_html("reflink", "team", "here")`
7474
for a list of the Delphi team members.
7575

7676
With new members comes a new breadth of expertise:
@@ -145,14 +145,12 @@ Here's a quick summary:
145145
aggregated counts from massive medical claims data sets through partners like
146146
Change Healthcare.
147147

148-
- We've built a [public
149-
API](`r blogdown::shortcode_html("apiref", "api/covidcast.html")`),
150-
and [R and Python
151-
packages](`r blogdown::shortcode_html("apiref", "api/covidcast_clients.html")`),
148+
- We've built a `r blogdown::shortcode_html("apireflink", "api/covidcast.html", "public API")`,
149+
and `r blogdown::shortcode_html("apireflink", "api/covidcast_clients.html", "R and Python packages")`,
152150
to serve our indicators to researchers and the public. This API provides new
153151
data daily.
154152

155-
- We've built [interactive maps and graphics](`r blogdown::shortcode("ref", "covidcast")`) to
153+
- We've built `r blogdown::shortcode_html("reflink", "covidcast", "interactive maps and graphics")` to
156154
display our indicators, and better inform the public and decision-makers.
157155

158156
- We've developed forecasts of the future spread of the pandemic,

0 commit comments

Comments
 (0)