softinio.com/.woodpecker.yml
Salar Rahmanian af4afc4f73
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
Cors and preview environment updates
2024-02-17 12:47:52 -08:00

29 lines
1,000 B
YAML

steps:
- name: build
image: nixos/nix
commands:
- echo 'experimental-features = flakes nix-command' >> /etc/nix/nix.conf
- nix profile install nixpkgs#gnused --impure
- sed -i "s|base_url = \"https://www.softinio.com\"|base_url = \"https://$CI_COMMIT_BRANCH.softinio.com\"|" ./config.toml
- nix build
- nix flake show
- ls result
- nix develop --command wrangler pages deploy result --branch=$CI_COMMIT_BRANCH --project-name=softinio --commit-dirty=true
secrets: [ cloudflare_account_id, cloudflare_api_token ]
when:
event: [push]
branch:
exclude: [ main ]
- name: deploy
image: nixos/nix
commands:
- echo 'experimental-features = flakes nix-command' >> /etc/nix/nix.conf
- nix build
- nix develop --command wrangler pages deploy result --project-name=softinio --commit-dirty=true
secrets: [ cloudflare_account_id, cloudflare_api_token ]
when:
event: push
branch: main