Skip to content

Commit 6c14d0e

Browse files
committed
WIP
1 parent c3c85fc commit 6c14d0e

File tree

4 files changed

+32
-5
lines changed

4 files changed

+32
-5
lines changed

.github/workflows/main.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: CI
2-
on: [push, pull_request]
2+
on: [ push ]
33
env:
44
RUST_BACKTRACE: 1
55
jobs:
@@ -22,3 +22,28 @@ jobs:
2222
cargo build --all --locked
2323
cargo clippy -- --deny warnings
2424
cargo test --all --locked
25+
26+
- name: Build website
27+
run: cargo run
28+
29+
- name: Configure GitHub Pages
30+
uses: actions/configure-pages@v5
31+
32+
- name: Upload website
33+
uses: actions/upload-pages-artifact@v3
34+
with:
35+
path: html
36+
37+
deploy:
38+
needs: [ build ]
39+
environment:
40+
name: github-pages
41+
url: ${{ steps.deployment.outputs.page_url }}
42+
permissions:
43+
contents: read
44+
pages: write
45+
id-token: write
46+
runs-on: ubuntu-latest
47+
steps:
48+
- name: Deploy to GitHub Pages
49+
uses: actions/deploy-pages@v4

src/assets.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ fn compile_sass(root_dir: &Path, out_dir: &Path, filename: &str) -> anyhow::Resu
4141
write_file(&out_css_path, &css.into_bytes())
4242
.with_context(|| anyhow::anyhow!("couldn't write css file: {}", out_css_path.display()))?;
4343

44-
Ok(relative_url(&out_css_path, &out_dir)?)
44+
relative_url(&out_css_path, out_dir)
4545
}
4646

4747
fn concat_files(
@@ -71,7 +71,7 @@ fn concat_files(
7171
write_file(Path::new(&out_file_path), concatted.as_bytes())
7272
.with_context(|| anyhow::anyhow!("couldn't write vendor {extension}"))?;
7373

74-
Ok(relative_url(&out_file_path, &out_dir)?)
74+
relative_url(&out_file_path, out_dir)
7575
}
7676

7777
fn concat_vendor_css(root_dir: &Path, out_dir: &Path, files: Vec<&str>) -> anyhow::Result<String> {

src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
#![allow(unused)]
2+
13
use crate::assets::compile_assets;
24
use crate::i18n::{TeamHelper, create_loader};
35
use crate::redirect::create_redirects;
46
use crate::render::{RenderCtx, render_directory, render_governance, render_index};
5-
use crate::rust_version::RustVersion;
7+
use crate::rust_version::fetch_rust_version;
68
use crate::teams::{encode_zulip_stream, load_rust_teams};
79
use anyhow::Context;
810
use handlebars::{DirectorySourceOptions, Handlebars};

src/render.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ impl<'a> RenderCtx<'a> {
9595
parent: LAYOUT,
9696
is_landing: false,
9797
data,
98-
baseurl: baseurl(&lang),
98+
baseurl: baseurl(lang),
9999
is_translation: lang != "en-US",
100100
lang: lang.to_string(),
101101
pontoon_enabled: PONTOON_ENABLED,

0 commit comments

Comments
 (0)