Skip to content

Commit 033ad35

Browse files
authored
Remove old website code (#726)
* Replace date with frontmatter for posts * Remove `.` from post filenames * Fix doc unquoted html tag * Rename migration guides * Build examples instead of website, remove continuous bench * Remove website crate * Remove docs crate * Update README.md with regards to examples * Add build docs workflow * Remove netlify.toml
1 parent d84e964 commit 033ad35

File tree

130 files changed

+187
-8901
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+187
-8901
lines changed

.github/workflows/build_docs.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Build Docs
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths: [docs/**]
7+
8+
jobs:
9+
notify:
10+
name: Trigger Update
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: dispatch event
15+
uses: peter-evans/repository-dispatch@v3
16+
with:
17+
token: ${{ secrets.PAT }}
18+
repository: sycamore-rs/website
19+
event-type: update-submodule

.github/workflows/build_website.yml .github/workflows/build_examples.yml

+27-31
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
name: Build website
1+
name: Examples
22

33
on:
44
push:
55
branches: [main]
66

77
jobs:
8-
deploy:
9-
name: Deploy
8+
build:
9+
name: Build
1010
runs-on: ubuntu-latest
1111

1212
steps:
@@ -44,13 +44,9 @@ jobs:
4444
target/
4545
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
4646

47-
- name: Build website
48-
run: >
49-
cd website/ && npm ci && npm run prod
50-
5147
- name: Build examples
5248
run: |
53-
output="$(pwd)/website/dist"
49+
output="$(pwd)/dist"
5450
mkdir "$output/examples"
5551
for path in examples/*; do
5652
if [[ ! -d $path ]]; then
@@ -60,32 +56,32 @@ jobs:
6056
echo "building: $example"
6157
(
6258
cd "$path"
63-
dist_dir="$output/examples/$example"
59+
dist_dir="$output/$example"
6460
mkdir "$dist_dir"
65-
trunk build --release --dist "$dist_dir" --public-url "/examples/$example"
61+
trunk build --release --dist "$dist_dir" --public-url "/$example"
6662
)
6763
done
6864
69-
- name: Build rustdocs
70-
run: |
71-
cd packages/sycamore && cargo doc --no-deps --all-features
72-
cd ../sycamore-core && cargo doc --no-deps --all-features
73-
cd ../sycamore-futures && cargo doc --no-deps --all-features
74-
cd ../sycamore-macro && cargo doc --no-deps --all-features
75-
cd ../sycamore-reactive && cargo doc --no-deps --all-features
76-
cd ../sycamore-router && cargo doc --no-deps --all-features
77-
cd ../sycamore-router-macro && cargo doc --no-deps --all-features
78-
cd ../sycamore-web && cargo doc --no-deps --all-features
79-
cd ../../
80-
cp -r target/doc website/dist/api
81-
8265
- name: Create .nojekyll file
83-
run: touch website/dist/.nojekyll
66+
run: touch dist/.nojekyll
8467

85-
- name: Deploy to netlify
86-
uses: netlify/actions/cli@master
87-
env:
88-
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
89-
NETLIFY_SITE_ID: ${{ secrets.DEV_NETLIFY_SITE_ID }}
90-
with:
91-
args: deploy --prod
68+
- name: Upload static files as artifact
69+
uses: actions/upload-pages-artifact@v3
70+
with: dist/
71+
72+
deploy:
73+
name: Deploy
74+
75+
permissions:
76+
pages: write
77+
id-token: write
78+
environment:
79+
name: github-pages
80+
url: ${{ steps.deployment.outputs.page_url }}
81+
82+
runs-on: ubuntu-latest
83+
needs: build
84+
85+
steps:
86+
- name: Deploy to GitHub Pages
87+
uses: actions/deploy-pages@v4

.github/workflows/continuous_bench.yml

-37
This file was deleted.

Cargo.toml

-4
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ members = [
3535
"examples/attributes-passthrough",
3636
"examples/js-snippets",
3737

38-
# Website
39-
"docs",
40-
"website",
41-
4238
# Tools
4339
"packages/tools/bench",
4440
"packages/tools/bench-diff",

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ check them out!
5252

5353
### Viewing on `sycamore-rs.netlify.app`
5454

55-
All the examples are hosted under `sycamore-rs.netlify.app/examples/<example_name>` with
55+
All the examples are hosted under `examples.sycamore.dev/<example_name>` with
5656
`<example_name>` being the name of the example you want to view. For instance, the `todomvc` example
5757
is hosted on
58-
[`sycamore-rs.netlify.app/examples/todomvc`](https://sycamore-rs.netlify.app/examples/todomvc).
58+
[`examples.sycamore.dev/todomvc`](https://examples.sycamore.dev/todomvc).
5959

6060
### Building Locally
6161

docs/Cargo.toml

-11
This file was deleted.

docs/next/advanced/styling.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ TODO: Provide more details on current state of CSS in Sycamore.
99

1010
The simplest is just to use raw CSS files. This is very simple when using Trunk. For more
1111
information, refer to [the Trunk docs](https://trunkrs.dev/assets/#css). Be sure to include the
12-
`data-trunk` attribute in your <link> tag, otherwise Trunk will not serve it.
12+
`data-trunk` attribute in your `<link>` tag, otherwise Trunk will not serve it.
1313

1414
## CSS framework
1515

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)