From e640710292edc6f2c34139a1aa89e32e89de3051 Mon Sep 17 00:00:00 2001 From: Spxg Date: Sat, 17 May 2025 10:58:30 +0800 Subject: [PATCH] Add github pages workflow --- .github/workflows/pages.yaml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/pages.yaml diff --git a/.github/workflows/pages.yaml b/.github/workflows/pages.yaml new file mode 100644 index 0000000..c7b13bf --- /dev/null +++ b/.github/workflows/pages.yaml @@ -0,0 +1,35 @@ +name: Pages +on: + workflow_dispatch: + +permissions: + contents: write + +concurrency: pages + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 22 + - run: npm install + - run: npx postcss --dir assets/module.postcss assets/module.css/**/*.css --base assets/module.css + + - name: Setup + run: | + cargo install --locked trunk + + - name: Build + run: | + trunk build --release + + - name: Deploy + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./dist