diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 0cec253..7312932 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -7,7 +7,7 @@ on: jobs: deploy: - runs-on: ubuntu-latest + runs-on: macos-latest steps: - name: Checkout Code diff --git a/.github/workflows/gh-pages-deploy.yml b/.github/workflows/gh-pages-deploy.yml index 9e859e0..831599c 100644 --- a/.github/workflows/gh-pages-deploy.yml +++ b/.github/workflows/gh-pages-deploy.yml @@ -2,12 +2,19 @@ name: Test and release web on: push: - branches: [release] + branches: [master] workflow_dispatch: permissions: contents: write # for committing to gh-pages branch. + + +defaults: + run: + working-directory: utils-web + + jobs: verify: timeout-minutes: 10 @@ -21,7 +28,7 @@ jobs: - uses: taiki-e/install-action@v2 with: tool: just@1 - - run: just lint + # - run: just lint build-github-pages: needs: verify runs-on: ubuntu-latest @@ -39,17 +46,21 @@ jobs: run: npm install -D tailwindcss - name: Download and install Trunk binary run: wget -qO- https://github.com/thedodd/trunk/releases/latest/download/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf- + - name: install runst tool chain + run: curl -y --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh + - name: add wasm32 target + run: rustup target add wasm32-unknown-unknown - name: Build # build # "${GITHUB_REPOSITORY#*/}" evaluates into the name of the repository # using --public-url something will allow trunk to modify all the href paths like from favicon.ico to repo_name/favicon.ico . # this is necessary for github pages where the site is deployed to username.github.io/repo_name and all files must be requested # relatively as favicon.ico. if we skip public-url option, the href paths will instead request username.github.io/favicon.ico which # will obviously return error 404 not found. - run: cd utils-web && ./trunk build --release --public-url "${GITHUB_REPOSITORY#*/}" + run: ./trunk build --release --public-url "${GITHUB_REPOSITORY#*/}" - name: Deploy uses: JamesIves/github-pages-deploy-action@v4 with: - folder: dist + folder: utils-web/dist # this option will not maintain any history of your previous pages deployment # set to false if you want all page build to be committed to your gh-pages branch history single-commit: true \ No newline at end of file diff --git a/justfile b/justfile new file mode 100644 index 0000000..0eea435 --- /dev/null +++ b/justfile @@ -0,0 +1,42 @@ +@_list: + just --list --unsorted + + +alias r := run + +bt := '0' + +log := "warn" + +export JUST_LOG := log + +watch: + cargo watch -c -- just verify + +run: + trunk serve + +test: + cargo test --target wasm32-unknown-unknown + +# Perform all verifications (compile, test, lint etc.) +verify: test lint + +# Run the static code analysis +lint: + cargo fmt --check + +clean: + rm -rf target + rm -f Cargo.lock + rm -rf node_modules + + +fmt: + cargo fmt + + +install-tailwindcss: + curl -sLO https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-x64 + chmod +x tailwindcss-linux-x64 + mv tailwindcss-linux-x64 /usr/bin/tailwindcss \ No newline at end of file diff --git a/utils-web/Cargo.toml b/utils-web/Cargo.toml index b57d7e6..2de13f7 100644 --- a/utils-web/Cargo.toml +++ b/utils-web/Cargo.toml @@ -14,7 +14,6 @@ leptos_router = { version = "0.6.11", features = ["csr"] } leptos_meta = { version = "0.6.11", features = ["csr"] } gloo-net = { version = "0.2", features = ["http"] } log = "0.4.21" -stylers = "0.3.2" diff --git a/utils-web/justfile b/utils-web/justfile new file mode 100644 index 0000000..0eea435 --- /dev/null +++ b/utils-web/justfile @@ -0,0 +1,42 @@ +@_list: + just --list --unsorted + + +alias r := run + +bt := '0' + +log := "warn" + +export JUST_LOG := log + +watch: + cargo watch -c -- just verify + +run: + trunk serve + +test: + cargo test --target wasm32-unknown-unknown + +# Perform all verifications (compile, test, lint etc.) +verify: test lint + +# Run the static code analysis +lint: + cargo fmt --check + +clean: + rm -rf target + rm -f Cargo.lock + rm -rf node_modules + + +fmt: + cargo fmt + + +install-tailwindcss: + curl -sLO https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-x64 + chmod +x tailwindcss-linux-x64 + mv tailwindcss-linux-x64 /usr/bin/tailwindcss \ No newline at end of file diff --git a/utils-web/src/components/button.rs b/utils-web/src/components/button.rs index 8b13789..1f81d82 100644 --- a/utils-web/src/components/button.rs +++ b/utils-web/src/components/button.rs @@ -1 +1,4 @@ +pub fn button(){ + +} \ No newline at end of file diff --git a/utils-web/src/components/button/button.scss b/utils-web/src/components/button/button.scss deleted file mode 100644 index f5e6998..0000000 --- a/utils-web/src/components/button/button.scss +++ /dev/null @@ -1,5 +0,0 @@ -button { - background: red; - border: 1 px solid green; - border-radius: 12px; -} \ No newline at end of file diff --git a/utils-web/src/components/button/mod.rs b/utils-web/src/components/button/mod.rs deleted file mode 100644 index e69de29..0000000 diff --git a/utils-web/src/components/card.rs b/utils-web/src/components/card.rs index 8b13789..65909f6 100644 --- a/utils-web/src/components/card.rs +++ b/utils-web/src/components/card.rs @@ -1 +1,5 @@ + +pub fn card(){ + +} \ No newline at end of file diff --git a/utils-web/src/components/input.rs b/utils-web/src/components/input.rs index 8b13789..ae01887 100644 --- a/utils-web/src/components/input.rs +++ b/utils-web/src/components/input.rs @@ -1 +1,5 @@ + +pub fn input(){ + +} \ No newline at end of file diff --git a/utils-web/src/components/text.rs b/utils-web/src/components/text.rs index 8b13789..69b497d 100644 --- a/utils-web/src/components/text.rs +++ b/utils-web/src/components/text.rs @@ -1 +1,5 @@ + +pub fn text(){ + +} \ No newline at end of file diff --git a/utils-web/src/components/view.rs b/utils-web/src/components/view.rs index 8b13789..f645bf5 100644 --- a/utils-web/src/components/view.rs +++ b/utils-web/src/components/view.rs @@ -1 +1,5 @@ + +pub fn view(){ + +} \ No newline at end of file