Skip to content

Commit 3f0ba9a

Browse files
authored
Deploy docs again (#1669)
* First version of docs deploy (GH Action) * Add --nojekyll * Only deploy from main * Remove docs from CircleCI
1 parent 7d277aa commit 3f0ba9a

File tree

2 files changed

+42
-61
lines changed

2 files changed

+42
-61
lines changed

.circleci/config.yml

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,6 @@ workflows:
88
workflow:
99
jobs:
1010
- build
11-
- docs-build:
12-
requires:
13-
- build
14-
- docs-deploy:
15-
requires:
16-
- docs-build
17-
- build
18-
filters:
19-
branches:
20-
only: main
2111
- test-backends:
2212
requires:
2313
- build
@@ -554,57 +544,6 @@ jobs:
554544
./scripts/simapp50/stop.sh
555545
./scripts/simapp50/slow_stop.sh
556546
./scripts/wasmd/stop.sh
557-
docs-build:
558-
docker:
559-
- image: cimg/node:18.20
560-
steps:
561-
- run:
562-
name: Install Git Large File Storage (LFS)
563-
command: sudo apt-get install git-lfs
564-
- checkout
565-
- attach_workspace:
566-
at: /tmp/builds
567-
- run:
568-
name: Merge build folders into project (merge with hardlinks)
569-
command: cp --recursive --link /tmp/builds/* .
570-
- run:
571-
name: Version information
572-
command: echo "node $(node --version)"; echo "yarn $(yarn --version)"
573-
- run:
574-
name: Install libusb
575-
command: |
576-
sudo apt update
577-
sudo apt install libusb-1.0-0-dev
578-
- run:
579-
name: Install Dependencies
580-
command: yarn install --immutable --immutable-cache --check-cache
581-
- run:
582-
name: Build package docs
583-
command: yarn docs
584-
- run:
585-
name: Copy docs into deployment folder
586-
command: ./scripts/docs/copy_docs.sh
587-
- persist_to_workspace:
588-
root: .
589-
paths: docs_deployment
590-
docs-deploy:
591-
docker:
592-
- image: cimg/node:18.20
593-
steps:
594-
- attach_workspace:
595-
at: .
596-
- add_ssh_keys:
597-
fingerprints:
598-
- "a7:b3:94:4a:9e:e1:30:fa:ca:22:d1:db:a1:78:d6:e4"
599-
- run:
600-
name: Add GitHub to known hosts
601-
command: |
602-
mkdir -p ~/.ssh
603-
echo 'github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==' >> ~/.ssh/known_hosts
604-
- run:
605-
name: Deploy to GitHub pages
606-
# Version pinned to 3.0.0 because of https://github.com/tschaub/gh-pages/issues/354
607-
command: npx [email protected] --message "Update docs [skip ci]" --dist docs_deployment --user "CI deployment <[email protected]>" --repo "[email protected]:cosmos/cosmjs.git"
608547
faucet-docker:
609548
docker:
610549
- image: cimg/go:1.17.8

.github/workflows/docs.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Docs # needed to securely identify the workflow
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [ "main" ]
7+
8+
jobs:
9+
build-and-deploy:
10+
permissions:
11+
contents: write
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
lfs: true
17+
18+
- name: Use Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '20.x'
22+
cache: 'yarn'
23+
24+
- name: Install dependencies
25+
run: yarn install --immutable --immutable-cache --check-cache
26+
27+
- name: Build
28+
run: yarn build
29+
30+
- name: Build package docs
31+
run: yarn docs
32+
33+
- name: Copy docs into deployment folder
34+
run: ./scripts/docs/copy_docs.sh
35+
36+
- name: Deploy to GitHub pages
37+
if: github.ref == 'refs/heads/master'
38+
run: |
39+
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
40+
npx gh-pages@6 --message "Update docs [skip ci]" --dist docs_deployment -u "github-actions-bot <[email protected]>" --nojekyll
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)