Skip to content

Commit

Permalink
Add website
Browse files Browse the repository at this point in the history
  • Loading branch information
Sereja313 committed Mar 14, 2024
1 parent a3b8f54 commit b0e44cf
Show file tree
Hide file tree
Showing 12 changed files with 2,125 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# © 2019-2024 Serokell <[email protected]>
# © 2019-2024 Lars Jellema <[email protected]>
#
# SPDX-License-Identifier: MPL-2.0

name: CI
on:
push:
branches:
- main

env:
CDN_DISTRIBUTION_ID: E13UN1J1JFIWUZ
CDN_BUCKET: s3://nixfmt.serokell.io

jobs:
deploy:
runs-on: [self-hosted, nix]
if: ${{ github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v4

- name: deploy webdemo
run: |
nix build .#nixfmt-webdemo
nix shell .#awscli -c aws s3 cp --recursive result/ "$CDN_BUCKET"
# delete files that don't exist anymore, use `--size-only` so behavior won't depend on local file timestamps
nix shell .#awscli -c aws s3 sync --delete --size-only result/ "$CDN_BUCKET"
nix shell .#awscli -c aws cloudfront create-invalidation --distribution-id "$CDN_DISTRIBUTION_ID" --paths '/*'
21 changes: 21 additions & 0 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
on:
schedule:
# runs every day at 10:00 am UTC
- cron: '0 10 * * *'

jobs:
update-nixfmt-input:
runs-on: [self-hosted, nix]
steps:
- uses: actions/checkout@v4
with:
token: ${{ env.SEROKELL_BOT_PAT }}

- name: update nixfmt input
run: nix flake lock --update-input nixfmt-src

- name: commit flake.lock
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Update nixfmt input"
file_pattern: "flake.lock"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/result
Loading

0 comments on commit b0e44cf

Please sign in to comment.