-
Notifications
You must be signed in to change notification settings - Fork 42
44 lines (44 loc) · 1.47 KB
/
update-article-views.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Update article views
on:
workflow_dispatch:
# schedule:
# # 12.00 every day
# - cron: "0 0 * * *"
jobs:
execute:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: gp-popular-articles # TODO: remove once merged
fetch-depth: 1
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Restore cache
uses: actions/cache@v3
with:
path: "**/node_modules"
key: ${{ runner.os }}-build-${{ github.sha }}
restore-keys: |
${{ runner.os }}-build-
- name: add tokens to .env
run: |
echo "SANITY_WRITE_KEY=${{ secrets.SANITY_UTILITY_WRITE }}" >> scripts/article-views/.env
- name: Run script
run: deno run --allow-net --allow-read --allow-env --no-config scripts/article-views/update-article-views/main.ts
- uses: nais/docker-build-push@v0
id: docker-push
with:
team: designsystem
push_image: true
dockerfile: scripts/article-views/Dockerfile
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
- name: start naisjob dev-gcp
uses: nais/deploy/actions/deploy@master
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
RESOURCE: scripts/naisjob.yaml
CLUSTER: dev-gcp
IMAGE: ${{ steps.docker-push.outputs.image }}