Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move main repo to a submodule to enable live editing #214

Merged
1 commit merged into from Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Setup Node
uses: actions/setup-node@v3
with:
Expand All @@ -24,8 +26,6 @@ jobs:
run: npm ci
- name: Lint code
run: npm run lint
- name: Fetch docs
run: make
- name: Build website
run: npm run build
- name: Publish to Cloudflare Pages
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Setup Node
uses: actions/setup-node@v3
with:
Expand All @@ -33,8 +35,6 @@ jobs:
run: npm ci
- name: Lint code
run: npm run lint
- name: Fetch docs
run: make
- name: Build website
run: npm run build
- name: Setup Pages
Expand Down
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@
.env.test.local
.env.production.local
.eslintcache
.idea

npm-debug.log*
yarn-debug.log*
yarn-error.log*

/opentofu-repo
/docs/**
!/docs/index.mdx
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "opentofu-repo"]
path = opentofu-repo
url = https://github.com/opentofu/opentofu
branch = main
26 changes: 0 additions & 26 deletions Makefile

This file was deleted.

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ npm i
3. Fetch the documentation

```bash
make
git submodule init
git submodule update
```

4. Start the development server
Expand Down
3 changes: 2 additions & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,13 @@ const config = {
},
docs: {
sidebarPath: require.resolve("./sidebars.js"),
path: "opentofu-repo/website/docs",
routeBasePath: "/docs",
editUrl: ({ docPath }) => {
// Remove the edit link from the documentation index page
// TODO: remove after moving the page to the main OpenTofu repo
if (docPath === "index.mdx") {
return undefined;
return `https://github.com/opentofu/opentofu.org/edit/main/docs/${docPath}`;
}

return `https://github.com/opentofu/opentofu/edit/main/website/docs/${docPath}`;
Expand Down
1 change: 1 addition & 0 deletions opentofu-repo
Submodule opentofu-repo added at 5d4ae4
Loading