Skip to content

Commit

Permalink
Merge remote-tracking branch 'template/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
rodber committed Sep 24, 2022
2 parents b71f630 + 0812254 commit f499bbf
Show file tree
Hide file tree
Showing 9 changed files with 28,085 additions and 1,549 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-
- name: Show dir contents
run: ls -la docs/.vuepress

- name: vuepress-deploy
uses: jenkey2011/vuepress-deploy@v1
env:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/update-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ on:
workflow_dispatch:
jobs:
update-template:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: actions-template-sync
uses: AndreasAugustin/actions-template-sync@v0.1.3-draft
uses: AndreasAugustin/actions-template-sync@v0.4.1-draft
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
source_repo_path: chevere/docs-deploy
Expand Down
8 changes: 7 additions & 1 deletion .vuepress/styles/default-index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,10 @@ h1, h2, h3, h4, h5, h6,
border-color $borderColor !important

.theme-code-group .theme-code-group__nav .theme-code-group__nav-tab
color var(--preTextColor) !important
color var(--preTextColor) !important

.theme-default-content code
font-size 0.93em

code, kbd, .line-number
font-family "FiraCode Nerd Font", "Operator Mono", Inconsolata, source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace
2 changes: 1 addition & 1 deletion config.sh.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# !/usr/bin/env sh

GIT_DOCS="[email protected]:chevere/docs.git"
GIT_HOSTING="[email protected]:chevere/chevere.github.io.git"
GIT_HOSTING="[email protected]:chevere/docs-hosting.git"
CNAME="chevere.org"
12 changes: 8 additions & 4 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# !/usr/bin/env sh

set -e
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
cd $PROJECT_DIR

if [ -f "./config.sh" ]; then
. ./config.sh
Expand All @@ -10,7 +12,7 @@ else
echo 'Using config.sh.dist'
fi

if [ "$1" = 'prod' ] && [ "$2" != 'true' ]; then
if [ "$1" = 'prod' ] && [ "$2" != 'repo' ]; then
echo -n "Are you sure to going production without sourcing docs repo? It will source from ./docs (y/n)? "
read answer
if [ "$answer" != "${answer#[Nn]}" ]; then
Expand All @@ -19,12 +21,13 @@ if [ "$1" = 'prod' ] && [ "$2" != 'true' ]; then
fi
fi

if [ "$2" = 'true' ]; then
if [ "$2" = 'repo' ]; then
if [ -d "docs" ]; then
cd docs
if [ "$(git config --get remote.origin.url)" != "$GIT_DOCS" ]; then
echo "Docs repo changed!"
rm -rf -- "$(pwd -P)" && cd ..
rm -rf -- "$(pwd -P)"
cd ..
git clone $GIT_DOCS docs
else
git fetch --all
Expand All @@ -38,7 +41,8 @@ else
echo 'Skipping docs sourcing...'
fi

if [ $# -eq 3 ]; then
if [ "$2" = 'dir' ] && [ $# -eq 3 ]; then
echo "Sourcing docs from directory $3"
rm -rf docs/
cp -a $3 docs/
fi
Expand Down
16 changes: 8 additions & 8 deletions guides/console/DEPLOY.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ chmod +x deploy.sh

## Commands

Run `yarn dev` to preview.
### Dev

Deploy to dev targeting documentation local dir:

```sh
./deploy.sh <mode=dev|prod> <resource=true|false>
./deploy.sh dev dir ~/git/chevereto/v4-docs
```

Deploy to dev re-sourcing documentation repo:
Deploy to dev targeting documentation repo (in config file):

```sh
./deploy.sh dev true
./deploy.sh dev repo
```

Deploy to production re-sourcing documentation repo:
### Production

```sh
./deploy.sh prod true
```
Same as [dev](#dev) but change `dev` for `prod`.
Loading

0 comments on commit f499bbf

Please sign in to comment.