Skip to content
This repository was archived by the owner on Feb 14, 2023. It is now read-only.

Commit 2a4d972

Browse files
workflow update
1 parent 434dbd7 commit 2a4d972

File tree

4 files changed

+53
-11
lines changed

4 files changed

+53
-11
lines changed

.env

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
DOCTOOLS_IMAGE_VERSION=latest
2-
PROJECT=doctools
3-
LANGUAGE=en
4-
SOURCE_DIR=site
1+
###############################################
2+
# Project environment variables #
3+
# Uncomment the line to use and set the value #
4+
###############################################
55

6-
AWS_S3_BUCKET=docshosting
7-
AWS_REGION=us-east-2
6+
## Docker compose variables
7+
#DOCTOOLS_IMAGE_VERSION # Docker compose image. Default to 'latest'.
8+
9+
## MkDocs variables
10+
#DEBUG=true # uncomment to output debug infos in HTML source code. Requires MINIFY=false
11+
#VERSION=1.2.3 # uncomment to force a version number on your local preview
12+
#LANGUAGE # Two letters language code. Default language is 'en'
13+
#PREBUILD_INDEX=false # uncomment to speedup your preview build (will slow down searches)
14+
#MINIFY=false # uncomment to prevent HTML/CSS/JS code to be minified. Useful for debug.

.github/workflows/latest_publish.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,23 @@ jobs:
2121
with:
2222
fetch-depth: 0 # Required for mkdocs to be able to display pages last update info
2323

24+
- name: set environment vars from .env file
25+
uses: c-py/action-dotenv-to-setenv@a6380f4d905f42adb7c065db63e6d66d75b971ad #v3
26+
with:
27+
env-file: '.env'
28+
29+
- name: Set non empty LANGUAGE env
30+
shell: sh
31+
run: |
32+
echo "LANGUAGE=${LANGUAGE:-en}" >> $GITHUB_ENV
33+
2434
- name: Publish latest version to AWS
2535
uses: ConsenSys/doctools.action-builder/actions/latest-publish@main
2636
with:
2737
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
2838
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
29-
SITE_URL_BASE: ${{ secrets.SITE_URL_BASE }}
39+
SITE_ROOT: ${{ secrets.SITE_ROOT }} # must point at project level. No lang. No version.
40+
AWS_REGION: ${{ secrets.AWS_REGION }}
41+
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
42+
PROJECT: ${{ secrets.PROJECT }}
43+
LANGUAGE: ${{ env.LANGUAGE }}

.github/workflows/pr_preview_publish.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,17 @@ jobs:
1515
with:
1616
fetch-depth: 0 # Required for mkdocs to be able to display pages last update info
1717

18-
- uses: actions/checkout@v2
18+
- name: set environment vars from .env file
19+
uses: c-py/action-dotenv-to-setenv@a6380f4d905f42adb7c065db63e6d66d75b971ad #v3
1920
with:
20-
repository: ConsenSys/doctools.action-builder
21-
path: doctools
21+
env-file: '.env'
22+
23+
- name: Set non empty LANGUAGE env
24+
shell: sh
25+
run: |
26+
echo "LANGUAGE=${LANGUAGE:-en}" >> $GITHUB_ENV
2227
2328
- name: Build and publish PR preview
2429
uses: ConsenSys/doctools.action-builder/actions/pr-preview-publish@main
30+
with:
31+
LANGUAGE: ${{ env.LANGUAGE }}

.github/workflows/release_publish.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,23 @@ jobs:
1919
with:
2020
fetch-depth: 0 # Required for mkdocs to be able to display pages last update info
2121

22+
- name: set environment vars from .env file
23+
uses: c-py/action-dotenv-to-setenv@a6380f4d905f42adb7c065db63e6d66d75b971ad #v3
24+
with:
25+
env-file: '.env'
26+
27+
- name: Set non empty LANGUAGE env
28+
shell: sh
29+
run: |
30+
echo "LANGUAGE=${LANGUAGE:-en}" >> $GITHUB_ENV
31+
2232
- name: Publish release version to AWS
2333
uses: ConsenSys/doctools.action-builder/actions/release-publish@main
2434
with:
2535
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
2636
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
27-
SITE_URL_BASE: ${{ secrets.SITE_URL_BASE }}
37+
SITE_ROOT: ${{ secrets.SITE_ROOT }} # must point at project level. No lang. No version.
38+
AWS_REGION: ${{ secrets.AWS_REGION }}
39+
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
40+
PROJECT: ${{ secrets.PROJECT }}
41+
LANGUAGE: ${{ env.LANGUAGE }}

0 commit comments

Comments
 (0)