diff options
| author | jamie <git@skilet.ro> | 2026-03-10 22:22:35 +0000 |
|---|---|---|
| committer | jamie <git@skilet.ro> | 2026-03-11 21:05:45 +0000 |
| commit | 4e10545646950cb0dc3ab1f91da3b257e09773e4 (patch) | |
| tree | 16c060229e255f2c30cb2c0034017d15bd41376c | |
| parent | bb2f57cadf85dfa4ef6f33e11c764a71b129dc36 (diff) | |
feat: replace gh action with tangled spindle
| -rw-r--r-- | .github/workflows/publish.yml | 49 | ||||
| -rw-r--r-- | .tangled/workflows/deploy.yml | 39 |
2 files changed, 39 insertions, 49 deletions
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" |
