From 4e10545646950cb0dc3ab1f91da3b257e09773e4 Mon Sep 17 00:00:00 2001 From: jamie Date: Tue, 10 Mar 2026 22:22:35 +0000 Subject: feat: replace gh action with tangled spindle --- .github/workflows/publish.yml | 49 ------------------------------------------- .tangled/workflows/deploy.yml | 39 ++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 49 deletions(-) delete mode 100644 .github/workflows/publish.yml create mode 100644 .tangled/workflows/deploy.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 4366c41..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Deploy Hakyll website to GitHub Pages using Nix - -on: - push: - workflow_dispatch: - -permissions: - contents: read - pages: write - id-token: write - -concurrency: - group: "pages" - cancel-in-progress: true - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install Nix - uses: cachix/install-nix-action@v31 - with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} - - - name: Build Site using Hakyll - run: nix build - - - name: Setup Pages - id: pages - uses: actions/configure-pages@v5 - - - name: Upload Artifact - uses: actions/upload-pages-artifact@v3 - with: - path: ./result/dist - - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - needs: build - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.tangled/workflows/deploy.yml b/.tangled/workflows/deploy.yml new file mode 100644 index 0000000..e0087a2 --- /dev/null +++ b/.tangled/workflows/deploy.yml @@ -0,0 +1,39 @@ +when: + - event: ["push"] + branch: ["master"] + +engine: "nixery" + +dependencies: + nixpkgs: + - nix + - coreutils + - curl + - glibc + - nodejs + +environment: + SITE_PATH: "result/dist" + SITE_NAME: "personal" + WISP_HANDLE: "skilet.ro" + +steps: + - name: Build Site with Nix + command: | + export PATH="$HOME/.nix-profile/bin:$PATH" + + nix build + + - name: Deploy to Wisp + command: | + # Download Wisp CLI + curl https://sites.wisp.place/nekomimi.pet/wisp-cli-binaries/wisp-cli-x86_64-linux -o wisp-cli + + chmod +x wisp-cli + + # Deploy to Wisp + ./wisp-cli \ + "$WISP_HANDLE" \ + --path "$SITE_PATH" \ + --site "$SITE_NAME" \ + --password "$WISP_APP_PASSWORD" -- cgit v1.3.1