Skip to content

Commit 2593a1f

Browse files
authored
chore: migrate documentation site from Netlify app to GHA w/ docker image (#8629)
1 parent e796d24 commit 2593a1f

File tree

5 files changed

+101
-5
lines changed

5 files changed

+101
-5
lines changed
File renamed without changes.

.github/workflows/deploy-netlify.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: 'Netlify Deploy - Release'
2+
3+
on:
4+
release:
5+
types: ['published']
6+
# Allows you to run this workflow manually from the Actions tab
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
statuses: write
12+
13+
jobs:
14+
deploy:
15+
name: 'Deploy Release'
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout code repository
20+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
21+
22+
- name: Install deps and audit
23+
uses: ./.github/actions/pnpm
24+
25+
- name: Build typdoc site
26+
run: pnpm docs:all
27+
28+
- uses: jsmrcaga/[email protected]
29+
with:
30+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
31+
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
32+
NETLIFY_DEPLOY_MESSAGE: "Prod deploy v${{ github.ref }}"
33+
NETLIFY_DEPLOY_TO_PROD: true
34+
install_command: "echo Skipping installing the dependencies"
35+
build_command: "echo Skipping building the web files"
36+
debug: true
37+
build_directory: "site"
38+
monorepo_package: "electron-builder"
39+
40+
# Creates a status check with link to preview
41+
- name: Set Status check on commit
42+
uses: guibranco/[email protected]
43+
with:
44+
authToken: ${{ secrets.GITHUB_TOKEN }}
45+
state: success
46+
context: Netlify Documentation Site preview
47+
description: Production - Click "details"
48+
target_url: ${{ env.NETLIFY_PREVIEW_URL }}
49+
sha: ${{github.event.pull_request.head.sha || github.sha}}

.github/workflows/pr-netlify.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: 'Netlify Deploy - PR'
2+
3+
on:
4+
pull_request:
5+
types: ['opened', 'edited', 'synchronize']
6+
# Allows you to run this workflow manually from the Actions tab
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
statuses: write
12+
13+
jobs:
14+
deploy:
15+
name: 'Deploy PR'
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout code repository
20+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
21+
22+
- name: Install deps and audit
23+
uses: ./.github/actions/pnpm
24+
25+
- name: Build typdoc site
26+
run: pnpm docs:all
27+
28+
# Sets the branch name as environment variable
29+
- uses: nelonoel/[email protected]
30+
- uses: jsmrcaga/[email protected]
31+
with:
32+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
33+
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
34+
deploy_alias: ${{ env.BRANCH_NAME }}
35+
install_command: "echo Skipping installing the dependencies"
36+
build_command: "echo Skipping building the web files"
37+
debug: true
38+
build_directory: "site"
39+
monorepo_package: "electron-builder"
40+
41+
# Creates a status check with link to preview
42+
- name: Set Status check on commit
43+
uses: guibranco/[email protected]
44+
with:
45+
authToken: ${{ secrets.GITHUB_TOKEN }}
46+
state: success
47+
context: Netlify Documentation Site preview
48+
description: Development - Click "details"
49+
target_url: ${{ env.NETLIFY_PREVIEW_URL }}
50+
sha: ${{github.event.pull_request.head.sha || github.sha}}
File renamed without changes.

mkdocs-dockerfile

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
FROM squidfunk/mkdocs-material
2-
RUN pip install mkdocs-include-markdown-plugin
3-
RUN pip install pymdown-extensions
4-
RUN pip install pygments
5-
RUN pip install markdown-include
1+
FROM squidfunk/mkdocs-material:9.5
2+
RUN pip install mkdocs-include-markdown-plugin pymdown-extensions pygments markdown-include

0 commit comments

Comments
 (0)