-
Notifications
You must be signed in to change notification settings - Fork 70
65 lines (59 loc) · 1.76 KB
/
Copy pathdeploy.yaml
File metadata and controls
65 lines (59 loc) · 1.76 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Deploy site
on:
schedule:
- cron: "0 9 * * *"
workflow_dispatch:
push:
branches:
- main
- "pull-request/[0-9]+"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
permissions:
id-token: write
contents: read
jobs:
build:
name: Build (and deploy)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false
- name: Set up uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
enable-cache: true
- name: Install dependencies
run: uv sync --locked
- name: Build and validate portal
run: make check
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@61815dcd50bd041e203e49132bacad1fd04d2708 # v5.1.1
with:
role-to-assume: ${{ vars.AWS_ROLE_ARN }}
aws-region: ${{ vars.AWS_REGION }}
role-duration-seconds: 7200
- name: Assemble complete documentation site
run: make assemble
- name: Deploy site
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_API_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_DOCS_SITE_ID }}
run: |
# TODO: use the official netlify-cli package after
# https://github.com/netlify/cli/issues/1809 is resolved and deployed.
npm install --global --force @aschmidt8/netlify-cli
ARGS=""
if [ "$GITHUB_REF_NAME" = "main" ]; then
ARGS="--prod"
fi
netlify deploy "$ARGS" \
--debug \
--dir=_site