Skip to content

Introduce Github Action #2

Introduce Github Action

Introduce Github Action #2

Workflow file for this run

name: deploy
on: push
env:
NIX_PATH: "nixpkgs=channel:nixos-unstable"
CDN_DISTRIBUTION_ID: "E37J93462NMI5V"
CDN_BUCKET: "s3://ghc.dev-prod"
jobs:
build:
runs-on: [self-hosted, nix]
steps:
- uses: actions/checkout@v3
- name: build
run: nix build
- name: deploy
# if: github.ref_name == 'master'
run: |
nix-shell -p awscli --run "aws s3 cp out $CDN_BUCKET/ --recursive"
echo +++ Invalidating cache"
nix-shell -p awscli --run "aws cloudfront create-invalidation --distribution-id $CDN_DISTRIBUTION_ID --paths '/*'"