-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace Buildkite with Github Action
Problem: we would like to decommission Buildkite usage in all our repos Solution: replace Buildkite with Github Action
- Loading branch information
Showing
3 changed files
with
23 additions
and
19 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: deploy | ||
on: push | ||
env: | ||
NIX_PATH: "nixpkgs=channel:nixos-unstable" | ||
CDN_DISTRIBUTION_ID: "E37J93462NMI5V" | ||
CDN_BUCKET: "s3://ghc.dev-prod" | ||
|
||
jobs: | ||
deploy_to_AWS: | ||
runs-on: [self-hosted, nix] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: build | ||
run: nix build | ||
- name: deploy | ||
if: github.ref_name == 'master' | ||
run: | | ||
nix-shell -p awscli --run "aws s3 cp result/out $CDN_BUCKET/ --recursive" | ||
echo +++ Invalidating cache | ||
nix-shell -p awscli --run "aws cloudfront create-invalidation --distribution-id $CDN_DISTRIBUTION_ID --paths '/*'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,6 @@ tags | |
|
||
# Output | ||
out | ||
|
||
# Temporary files generated by nix | ||
result |