-
-
Notifications
You must be signed in to change notification settings - Fork 5
61 lines (50 loc) · 1.87 KB
/
Copy pathdeploy-docs.yml
File metadata and controls
61 lines (50 loc) · 1.87 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
---
name: Deploy Docs
on:
workflow_dispatch:
env:
NODE_VERSION: 22
jobs:
deploy:
name: Deploy Docs
runs-on: ubuntu-latest
steps:
- name: Check out a copy of the repo
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v3
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: pnpm install --frozen-lockfile
# - name: Set Version Path
# run: echo "ADDON_DOCS_VERSION_PATH=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Set Latest
run: echo "ADDON_DOCS_UPDATE_LATEST=true" >> $GITHUB_ENV
- name: Print Env
run: echo $GITHUB_ENV
- name: Build docs
run: pnpm run build
working-directory: 'docs'
- name: Deploy
env:
# Transport the key base64-encoded (DOCS_DEPLOY_KEY_B64) to survive
# newline trimming / CRLF mangling. Decode it to a file and hand
# ember-cli-deploy-git-ci the PATH (DEPLOY_KEY_PATH -> deployKeyPath in
# config/deploy.js), never the key value itself. ember-cli-deploy logs
# config values under --verbose, so passing the key as a value (the
# `deployKey`/DEPLOY_KEY default) would print the private key into the
# logs. The matching public key is a write-enabled Deploy Key on
# jkeen/ember-stereo.
DOCS_DEPLOY_KEY_B64: ${{ secrets.DOCS_DEPLOY_KEY_B64 }}
run: |
set -euo pipefail
KEY_FILE="$RUNNER_TEMP/docs_deploy_key"
printf '%s' "$DOCS_DEPLOY_KEY_B64" | base64 -d | tr -d '\r' > "$KEY_FILE"
chmod 600 "$KEY_FILE"
export DEPLOY_KEY_PATH="$KEY_FILE"
pnpm exec ember deploy production --activate
working-directory: 'docs'