-
Notifications
You must be signed in to change notification settings - Fork 579
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: switched to docusaurus check and deploy workflows
- Loading branch information
Showing
2 changed files
with
33 additions
and
38 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,26 +1,27 @@ | ||
# This check-docs workflow was created based on instructions from: | ||
# https://docusaurus.io/docs/deployment | ||
name: Check docs build | ||
# This workflow runs when a PR is labeled with `docs` | ||
# This will check if the docs build successfully by running `npm run build` | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- './docs' | ||
|
||
jobs: | ||
check-docs-build: | ||
if: ${{ github.event.label.name == 'docs' }} | ||
|
||
name: Check docs build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v4 | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
persist-credentials: false | ||
fetch-depth: 0 | ||
node-version: 18 | ||
cache: npm | ||
|
||
- name: Install dependencies and build docs 🧱 | ||
run: | | ||
cd docs | ||
npm install | ||
npm run build | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Test build website | ||
run: npm run build |
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,42 +1,36 @@ | ||
name: Deploy docs | ||
# This job builds and deploys documenation to github pages. | ||
# It runs on every push to main with a change in the docs folder. | ||
# This deploy-docs workflow was created based on instructions from: | ||
# https://docusaurus.io/docs/deployment | ||
name: Deploy to GitHub Pages | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "docs/**" | ||
- .github/workflows/deploy-docs.yml | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build-and-deploy: | ||
permissions: | ||
contents: write # for JamesIves/github-pages-deploy-action to push changes in repo | ||
deploy: | ||
name: Deploy to GitHub Pages | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/cosmos/website-deployment | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v4 | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
ref: "main" | ||
persist-credentials: false | ||
fetch-depth: 0 | ||
path: "." | ||
node-version: 18 | ||
cache: npm | ||
|
||
- name: Build 🔧 | ||
run: | | ||
git config --global --add safe.directory /__w/ibc-go/ibc-go | ||
make build-docs LEDGER_ENABLED=false | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Build website | ||
run: npm run build | ||
|
||
- name: Deploy 🚀 | ||
uses: JamesIves/github-pages-deploy-action@v4.4.3 | ||
# Popular action to deploy to GitHub Pages: | ||
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus | ||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
branch: gh-pages | ||
folder: ~/output | ||
single-commit: true | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# Build output to publish to the `gh-pages` branch: | ||
publish_dir: ./build |