ci: clone repo fallback on hosted runners
This commit is contained in:
parent
ff19be3b21
commit
f9c4f9e63c
1 changed files with 9 additions and 0 deletions
|
|
@ -18,8 +18,17 @@ jobs:
|
||||||
- name: Deploy website + worker
|
- name: Deploy website + worker
|
||||||
env:
|
env:
|
||||||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
|
CODEBERG_TOKEN: ${{ secrets.CODEBERG_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
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
|
if ! command -v nix >/dev/null 2>&1; then
|
||||||
curl -L https://nixos.org/nix/install | sh -s -- --no-daemon
|
curl -L https://nixos.org/nix/install | sh -s -- --no-daemon
|
||||||
. "$HOME/.nix-profile/etc/profile.d/nix.sh"
|
. "$HOME/.nix-profile/etc/profile.d/nix.sh"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue