diff --git a/.forgejo/workflows/deploy-cloudflare.yml b/.forgejo/workflows/deploy-cloudflare.yml index b4968f6..c8242b0 100644 --- a/.forgejo/workflows/deploy-cloudflare.yml +++ b/.forgejo/workflows/deploy-cloudflare.yml @@ -18,8 +18,17 @@ jobs: - name: Deploy website + worker env: CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} + CODEBERG_TOKEN: ${{ secrets.CODEBERG_TOKEN }} run: | set -euo pipefail + if [[ ! -f "./scripts/deploy-workers.sh" ]]; then + if [[ -z "${CODEBERG_TOKEN:-}" ]]; then + echo "error: workspace missing repo files and CODEBERG_TOKEN is not set" + exit 2 + fi + git clone "https://every-channel:${CODEBERG_TOKEN}@codeberg.org/every-channel/every.channel.git" .repo + cd .repo + fi if ! command -v nix >/dev/null 2>&1; then curl -L https://nixos.org/nix/install | sh -s -- --no-daemon . "$HOME/.nix-profile/etc/profile.d/nix.sh"