Skip to content

misc refined

misc refined #120

Workflow file for this run

name: Build/Publish/Deploy # https://docs.github.com/en/actions
on:
push:
branches:
- master
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest # https://github.com/actions/virtual-environments
steps:
#- run: rustup update
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
#- uses: swatinem/rust-cache@v2
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
~/.npm
node_modules/
package.json
package-lock.json
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: cargo-bins/cargo-binstall@main
#- uses: taiki-e/install-action@nextest
- name: Build Project with Dioxus and TailwindCSS
run: |
cargo binstall dioxus-cli@0.6.0
npm install tailwindcss -D -g
npx tailwindcss -i tailwind_base.css -o assets/tailwind.css -m
#cargo r --bin syncd -F syncdep
dx build -r --platform web
cargo t #cargo nextest r
#- name: Setup GitHub Pages
# uses: actions/configure-pages@v4
- name: Upload Artifacts
uses: actions/upload-pages-artifact@v3
#env:
# REPO_NAME: ${GITHUB_REPOSITORY#$GITHUB_REPOSITORY_OWNER/}
with: # https://github.com/actions/upload-pages-artifact
path: target/dx/${{ github.event.repository.name }}/release/web/public
# path: target/dx/${{ env.REPO_NAME }}/release/web/public
deploy:
#if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs: build
permissions: # Grant GITHUB_TOKEN the permissions required to make a Pages deployment
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps: # https://github.com/actions/deploy-pages
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
id: deployment