-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
03f0380
commit c432300
Showing
8 changed files
with
88 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
# This and ../CODEOWNERS files must match | ||
|
||
* @segfaultxavi | ||
.github/workflows @aljazs-flare | ||
.gitlab-ci.yml @aljazs-flare |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
name: deploy-docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy: | ||
if: github.repository == 'flare-foundation/docs' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.x | ||
- run: pip install -r requirements.txt | ||
- run: mkdocs gh-deploy --force | ||
- run: mkdocs build --strict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
site | ||
.cache/ | ||
.cache/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
pages: | ||
needs: [] | ||
image: python:3.10-buster | ||
stage: deploy | ||
variables: | ||
GIT_DEPTH: 0 | ||
environment: | ||
name: production | ||
url: https://${CI_PROJECT_NAMESPACE}.gitlab.io/-/${CI_PROJECT_NAME}/-/jobs/$CI_JOB_ID/artifacts/public/index.html | ||
action: start | ||
cache: | ||
key: | ||
files: | ||
- requirements.txt | ||
paths: | ||
- .cache | ||
before_script: | ||
- | | ||
# install for sponge | ||
apt-get update 1> /dev/null | ||
apt-get install moreutils -qqy curl 1> /dev/null | ||
# like jq, but for yml - https://github.com/mikefarah/yq | ||
wget --quiet https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq && chmod +x /usr/bin/yq | ||
- if [ -d "public" ]; then echo "Directory ./public exists while it should not as it is used for docs artifacts" && exit 1; fi | ||
- pip install -q -r requirements.txt 1> /dev/null | ||
script: | ||
- | | ||
set -o pipefail | ||
mkdocs build --verbose --strict --site-dir ./public 2>&1 | tee -a /tmp/mkdocs.build.log || { cat /tmp/mkdocs.build.log | grep "WARNING"; exit 1; } | ||
test -f public/index.html && echo "View the generated docs at $CI_ENVIRONMENT_URL" | ||
artifacts: | ||
expire_in: 3 days | ||
paths: | ||
- public | ||
rules: | ||
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH | ||
|
||
mkdocs-preview: | ||
extends: pages | ||
stage: build | ||
variables: | ||
REPO_NAME: ${CI_PROJECT_PATH} | ||
REPO_URL: ${CI_PROJECT_URL}/-/tree/${CI_COMMIT_REF_NAME} | ||
EDIT_URL: https://gitlab.com/-/ide/project/${CI_PROJECT_PATH}/tree/${CI_COMMIT_REF_NAME}/-/ | ||
environment: | ||
name: review/$CI_COMMIT_REF_SLUG | ||
url: https://${CI_PROJECT_NAMESPACE}.gitlab.io/-/${CI_PROJECT_NAME}/-/jobs/$CI_JOB_ID/artifacts/public/index.html | ||
before_script: | ||
- !reference [.mkdocs-base, before_script] | ||
- | | ||
# modify link in navbar according to current git branch (ref) | ||
cat mkdocs.yml | /usr/bin/yq '.repo_url = strenv(REPO_URL)' | sponge mkdocs.yml | ||
cat mkdocs.yml | /usr/bin/yq '.edit_uri = strenv(EDIT_URL)' | sponge mkdocs.yml | ||
cat mkdocs.yml | /usr/bin/yq '.repo_name = strenv(REPO_NAME)' | sponge mkdocs.yml | ||
rules: | ||
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH | ||
when: never | ||
- if: $CI_MERGE_REQUEST_IID == null | ||
variables: | ||
REPO_NAME: ${CI_PROJECT_PATH}:${CI_COMMIT_REF_NAME} | ||
- if: $CI_MERGE_REQUEST_IID != null | ||
variables: | ||
REPO_NAME: ${CI_PROJECT_PATH}!${CI_MERGE_REQUEST_IID} | ||
REPO_URL: ${CI_PROJECT_URL}/-/merge_requests/${CI_MERGE_REQUEST_IID} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"recommendations": [ | ||
"davidanson.vscode-markdownlint", | ||
"gitlab.gitlab-workflow", | ||
"redhat.vscode-yaml" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# This and .github/CODEOWNERS files must match | ||
|
||
* @segfaultxavi | ||
.github/workflows @aljazs-flare | ||
.gitlab-ci.yml @aljazs-flare |