retype
retype copied to clipboard
Can submodules be the same as folders in retype?
When i deploy locally, it works just fine. But, when i try with github pages or cloudflare pages, only the main repo is hosted. For reference, my repository and hosted versions: https://github.com/luascfl/tutorial-linkedin https://luascfl.github.io/tutorial-linkedin/ https://tutorial-linkedin.pages.dev/
ty in advance
Out of the box with the default functionality, it appears Retype will not automatically clone the submodules during the build process. I will look into this today and see if there is a way to get this working.
@geoffreymcgill
Managed to fix the problem.
Now hosted at:
- https://luascfl.github.io/tutorial-linkedin/
- https://tutorial-linkedin.pages.dev/
- https://elegant-meerkat-67c034.netlify.app/
I'm not a programmer, so I continuously sent the retype-action.yml code along with deployment errors to Deepseek.
Initial Changes
Initially, I changed the step to checkout the repository and also added a step to initialize submodules:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Initialize submodules
run: git submodule update --init --recursive
GitHub Actions Error
Then GitHub Actions reported that Retype was trying to remove submodules (rmdir errors):
Run retypeapp/action-github-pages@latest
Run ${GITHUB_ACTION_PATH}/github.sh
Retype built documentation path: /tmp/tmp.cgpztxZtFh
Target branch: retype
Target directory: ./
Fetching remote for existing branches: done.
Branch 'retype' already exists.
warning: unable to rmdir 'auto-confignotifications-linkedin': Directory not empty
warning: unable to rmdir 'auto-connect-linkedin': Directory not empty
warning: unable to rmdir 'auto-deletealerts-linkedin': Directory not empty
warning: unable to rmdir 'auto-deletenotifications-linkedin': Directory not empty
warning: unable to rmdir 'auto-followcompany-linkedin': Directory not empty
warning: unable to rmdir 'auto-updatejobalerts-linkedin': Directory not empty
Switching to the 'retype' branch: done.
fatal: pathspec 'auto-confignotifications-linkedin' did not match any files
Cleaning up branch: found config.js's ID, error.
Error: unable to remove directory at root: auto-confignotifications-linkedin
Error: Process completed with exit code 1.
Possible Fix
I believe Deepseek fixed the problem by not using retypeapp/action-github-pages but instead switching to [JamesIves/github-pages-deploy-action](https://github.com/JamesIves/github-pages-deploy-action).
Would love to know if this could be fixed, implemented as an option, or explained.
Should this issue be closed?
Further changes beyond my comprehension below:
Fixed Version (retype-action.yml)
name: Publish Retype powered website to GitHub Pages
on:
workflow_dispatch:
push:
branches:
- main
jobs:
publish:
name: Publish to retype branch
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Initialize submodules
run: git submodule update --init --recursive
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
- name: Install Retype globally
run: dotnet tool install --global retypeapp
- name: Build with Retype
env:
RETYPE_LICENSE_KEY: ${{ secrets.RETYPE_LICENSE_KEY }}
run: retype build --output ./retype-dist
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: retype
folder: ./retype-dist
clean: true
force: true