-
|
Hello, I would like to add a preview feature to this repo whose deployment of the Docusaurus website on Github Pages is done following these steps : name: Documentation
on:
push:
paths:
- '.github/workflows/documentation.yml'
- 'testsite/**'
- 'src/**'
repository_dispatch:
types: [generate-documentation]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
pull-requests: write
actions: write
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v3.3.0
- name: Setup Node
uses: actions/setup-node@v3.6.0
with:
node-version: "lts/*"
- name: Get yarn cache
id: yarn-cache
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v3.2.4
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-testsite-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-testsite-
- name: Install lib 💻
run: |
npm install
- name: Build lib 🤖
run: |
npm run build
- name: Link lib 🔗
run: |
npm link
- name: Install website 💻
run: |
cd testsite
npm link docusaurus-json-schema-plugin --save
npm install --prefer-dedupe
npm dedupe
- name: Build website 🤖
run: |
cd testsite
yarn build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3.9.1
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./testsite/buildSo I read some pages :
But I couldn't find the proper way to achieve it Thanks in advance, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hey @jy95, I'm not sure this has much to do with turborepo. Docasaurus themselves have some documentation on deploying to Github Pages: https://docusaurus.io/docs/deployment#deploying-to-github-pages. Check it out and maybe open a discussion there if you're having issues? https://github.com/facebook/docusaurus/discussions |
Beta Was this translation helpful? Give feedback.
Hey @jy95, I'm not sure this has much to do with turborepo. Docasaurus themselves have some documentation on deploying to Github Pages: https://docusaurus.io/docs/deployment#deploying-to-github-pages. Check it out and maybe open a discussion there if you're having issues? https://github.com/facebook/docusaurus/discussions