Skip to content

Commit

Permalink
update the workflow to publish to gh-pages
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Fernandes <joshua.fernandes@consensys.net>
  • Loading branch information
joshuafernandes committed Jan 24, 2024
1 parent f679ced commit 5bc1567
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 41 deletions.
39 changes: 0 additions & 39 deletions .github/workflows/publish-docs.yml

This file was deleted.

28 changes: 26 additions & 2 deletions .github/workflows/publish-main-docs.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,36 @@
name: Publish main branch docs to GitHub Pages
# NOTE that we publish `main` to github pages branch: gh-pages
# and previews only are handled by vercel

on:
push:
branches: main

jobs:
publish-to-gh-pages:
publish-docs-to-gh-pages:
name: Publish docs to `./` directory of `gh-pages` branch
runs-on: ubuntu-latest
permissions:
contents: write
uses: ./.github/workflows/publish-docs.yml
steps:
- name: Checkout the repository
uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Install npm dependencies
run: yarn --immutable

- name: Run build script
run: yarn build

- name: Deploy to `./` directory of `gh-pages` branch
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
keep_files: true

0 comments on commit 5bc1567

Please sign in to comment.