-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix front and main flake add a common flake try flake-utils Revert "try flake-utils" This reverts commit b085080. add tools to back flake add common flake rm old files add common inputs update codium fix use common flake update flakes update flake inputs separate writing settings add nix merge builds install deps in ci try nix in ci update ci use nix only use ubuntu 22.04 try deploy back fix cp error echo back location try nix-shell fix typo add shell to back add cp add nix channel try build try-phi-back try nix develop with nixpkgs nix develop in separate step use default dir use nix shell add nix path use nix build try deploy from branch build front with nix add manual run add clear all other files try to clear branch keep .git prepare a folder use a helper folder trick heroku custom deploy to heroku try checkout a branch use env use branch name try push branch with -f ls branches checkout and name branch name branch checkout + heroku-deploy use reusable workflow add checkout add vscode extensions make an action try composite action make path add inputs rm env use prepare nix add extensions and settings add nix build
- Loading branch information
Showing
33 changed files
with
6,764 additions
and
3,589 deletions.
There are no files selected for viewing
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,46 @@ | ||
name: Prepare Nix | ||
|
||
# Syntax | ||
# https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#about-yaml-syntax-for-github-actions | ||
|
||
description: Install Nix, log in to cachix, cache flake inputs and shell | ||
|
||
inputs: | ||
ROOT: | ||
description: a dir for which this action should be run | ||
required: true | ||
GITHUB_TOKEN: | ||
description: GitHub token | ||
required: true | ||
CACHE: | ||
description: cache name | ||
default: br4ch1st0chr0n3-nix-managed | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Install Nix | ||
uses: cachix/install-nix-action@v17 | ||
with: | ||
extra_nix_config: | | ||
access-tokens = github.com=${{ inputs.GITHUB_TOKEN }} | ||
substituters = https://br4ch1st0chr0n3-nix-managed.cachix.org https://br4ch1st0chr0n3-flakes.cachix.org https://cache.nixos.org/ https://hydra.iohk.io https://nix-community.cachix.org | ||
trusted-public-keys = br4ch1st0chr0n3-nix-managed.cachix.org-1:sDKsfgu5fCCxNwVhZg+AWeGvbLlEtZoyzkSNKRM/KAo= br4ch1st0chr0n3-flakes.cachix.org-1:Dyc2yLlRIkdbq8CtfOe24QQhQVduQaezkyV8J9RhuZ8= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= | ||
# - uses: cachix/cachix-action@v10 | ||
# with: | ||
# name: ${{ env.cache }} | ||
# authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" | ||
# - name: Push inputs to cachix | ||
# run: | | ||
# # https://docs.cachix.org/pushing#flakes | ||
|
||
# nix flake archive --json \ | ||
# | jq -r '.path,(.inputs|to_entries[].value.path)' \ | ||
# | cachix push ${{ matrix.cache }} | ||
# # shell: bash | ||
# - name: Push devshell to cachix | ||
# run: | | ||
# nix develop --profile dev-profile | ||
# cachix push ${{ matrix.cache }} dev-profile | ||
# # shell: bash |
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,96 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
front: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-22.04] | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
ROOT: front | ||
CACHE: br4ch1st0chr0n3-nix-managed | ||
ARTIFACTS_BRANCH: front-artifacts | ||
ARTIFACTS_DIR: artifacts | ||
steps: | ||
- name: Checkout main | ||
uses: actions/checkout@v3 | ||
- name: Prepare Nix | ||
uses: ./.github/actions/prepare-nix | ||
with: | ||
ROOT: ${{ env.ROOT }} | ||
CACHE: ${{ env.CACHE }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build with Nix | ||
run: | | ||
cd ${{ env.ROOT }} | ||
nix develop -c bash -c ' | ||
npm run build:gh-pages | ||
' | ||
- name: GitHub Pages action | ||
uses: peaceiris/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./front/docs | ||
force_orphan: true | ||
|
||
back: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-22.04] | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
ROOT: back | ||
CACHE: br4ch1st0chr0n3-nix-managed | ||
ARTIFACTS_BRANCH: back-artifacts | ||
ARTIFACTS_DIR: artifacts | ||
APP_NAME: try-phi-back | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Prepare Nix | ||
uses: ./.github/actions/prepare-nix | ||
with: | ||
ROOT: ${{ env.ROOT }} | ||
CACHE: ${{ env.CACHE }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build with Nix | ||
run: | | ||
cd ${{ env.ROOT }} | ||
nix build | ||
- name: Prepare ${{ env.ARTIFACTS_DIR }} dir | ||
run: | | ||
cd ${{ env.ROOT }} | ||
mkdir ${{ env.ARTIFACTS_DIR }} | ||
cp result/bin/back Procfile ${{ env.ARTIFACTS_DIR }} | ||
printf "%s" '{ "name": "appname", "version": "0.0.1", "dependencies": {} }' > ${{ env.ARTIFACTS_DIR }}/package.json | ||
- name: Push ${{ env.ARTIFACTS_DIR }} dir to ${{ env.ARTIFACTS_BRANCH }} | ||
uses: s0/[email protected] | ||
env: | ||
REPO: self | ||
BRANCH: ${{ env.ARTIFACTS_BRANCH }} | ||
FOLDER: ${{ env.ROOT }}/${{ env.ARTIFACTS_DIR }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Deploy to Heroku | ||
- name: Checkout ${{ env.ARTIFACTS_BRANCH }} | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ env.ARTIFACTS_BRANCH }} | ||
|
||
- name: Push to Heroku | ||
uses: akhileshns/[email protected] | ||
with: | ||
heroku_api_key: ${{ secrets.HEROKU_API_KEY }} | ||
heroku_app_name: ${{ env.APP_NAME }} | ||
heroku_email: ${{ secrets.HEROKU_EMAIL }} | ||
branch: ${{ env.ARTIFACTS_BRANCH }} |
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 |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
.direnv | ||
result | ||
node_modules | ||
.parcel-cache | ||
.parcel-cache | ||
dev-profile* |
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 |
---|---|---|
@@ -1,11 +1,33 @@ | ||
{ | ||
"haskell.serverExecutablePath": "haskell-language-server", | ||
"todo-tree.regex.regex": "((--\\s*($TAGS))|\\{-\\s($TAGS).*(\\n.*)*-})", | ||
"editor.formatOnSave": true, | ||
"files.autoSave": "afterDelay", | ||
"files.refactoring.autoSave": true, | ||
"files.watcherExclude": { | ||
"**/.spago/**": true | ||
}, | ||
"git.autofetch": true, | ||
"gitlens.codeLens.authors.enabled": false, | ||
"gitlens.codeLens.enabled": false, | ||
"gitlens.codeLens.recentChange.enabled": false, | ||
"gitlens.currentLine.enabled": false, | ||
"gitlens.currentLine.pullRequests.enabled": false, | ||
"gitlens.hovers.currentLine.over": "line", | ||
"gitlens.hovers.enabled": false, | ||
"gitlens.statusBar.enabled": false, | ||
"haskell.manageHLS": "PATH", | ||
"haskell.serverExecutablePath": "haskell-language-server", | ||
"nix.enableLanguageServer": true, | ||
"nix.serverPath": "rnix-lsp", | ||
"purescript.formatter": "purs-tidy", | ||
"purescript.outputDirectory": "./front/output/", | ||
"purescript.packagePath": "./front", | ||
"purescript.sourcePath": "./front/src", | ||
"vscode-dhall-lsp-server.executable": "dhall-lsp-server" | ||
} | ||
"todo-tree.regex.regex": "((--\\s*($TAGS))|\\{-\\s($TAGS).*(\\n.*)*-})", | ||
"vscode-dhall-lsp-server.executable": "dhall-lsp-server", | ||
"workbench.colorTheme": "Monokai", | ||
"workbench.sideBar.location": "right", | ||
"yaml.schemas": { | ||
"https://json.schemastore.org/github-action": "./.githhub/actions/**/action.yml", | ||
"https://json.schemastore.org/github-workflow": "./.githhub/workflows/**/*.yml" | ||
} | ||
} |
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
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
Empty file.
Oops, something went wrong.