2024-02-10 18:04:44 -08:00
|
|
|
steps:
|
|
|
|
- name: build
|
|
|
|
image: nixos/nix
|
|
|
|
commands:
|
|
|
|
- echo 'experimental-features = flakes nix-command' >> /etc/nix/nix.conf
|
2024-02-17 11:06:29 -08:00
|
|
|
- nix profile install nixpkgs#gnused --impure
|
2024-02-17 12:33:31 -08:00
|
|
|
- sed -i "s|base_url = \"https://www.softinio.com\"|base_url = \"https://$CI_COMMIT_BRANCH.softinio.com\"|" ./config.toml
|
2024-02-10 18:04:44 -08:00
|
|
|
- nix build
|
|
|
|
- nix flake show
|
|
|
|
- ls result
|
2024-02-17 12:41:29 -08:00
|
|
|
- nix develop --command wrangler pages deploy result --branch=$CI_COMMIT_BRANCH --project-name=softinio --commit-dirty=true
|
2024-02-10 18:04:44 -08:00
|
|
|
secrets: [ cloudflare_account_id, cloudflare_api_token ]
|
|
|
|
when:
|
2024-02-17 12:27:50 -08:00
|
|
|
event: [push]
|
2024-02-10 18:04:44 -08:00
|
|
|
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
|
|
|
|
|