diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yml index 94bdabc..0882c82 100644 --- a/.forgejo/workflows/deploy.yml +++ b/.forgejo/workflows/deploy.yml @@ -12,21 +12,19 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Setup Node.js - uses: actions/setup-node@v4 + - name: Install Nix + uses: cachix/install-nix-action@v25 with: - node-version: '20' - cache: 'npm' + nix_path: nixpkgs=channel:nixos-unstable + extra_nix_config: | + experimental-features = nix-command flakes - - name: Install dependencies - run: npm ci - - - name: Build - run: npm run build - - - name: Install rclone + - name: Build with Nix run: | - curl https://rclone.org/install.sh | bash + nix-shell -p nodejs_20 git rclone --run " + npm ci + npm run build + " - name: Configure rclone run: | @@ -42,5 +40,7 @@ jobs: - name: Deploy to Storj run: | - rclone sync ./dist/ storj:${{ secrets.STORJ_BUCKET }}/ --progress - rclone sync ./public/downloads/ storj:${{ secrets.STORJ_BUCKET }}/downloads/ --progress + nix-shell -p rclone --run " + rclone sync ./dist/ storj:${{ secrets.STORJ_BUCKET }}/ --progress + rclone sync ./public/downloads/ storj:${{ secrets.STORJ_BUCKET }}/downloads/ --progress + "