Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixos-search
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 40bd247ee950
Choose a base ref
...
head repository: NixOS/nixos-search
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 824e37026f4f
Choose a head ref
  • 1 commit
  • 3 files changed
  • 1 contributor

Commits on Apr 10, 2020

  1. deploy to netlify (#1)

    garbas authored Apr 10, 2020
    1

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    824e370 View commit details
Showing with 64 additions and 2 deletions.
  1. +27 −0 .github/workflows/cron.yml
  2. +29 −0 .github/workflows/main.yml
  3. +8 −2 src/Main.elm
27 changes: 27 additions & 0 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "Hourly Build & Deploy to Netlify"
on:
schedule:
- cron: '0 * * * *'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checking out the repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Installing Nix
uses: cachix/install-nix-action@v8
- name: Building search.nixos.org
run: nix-shell --run "yarn prod"
- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v1.0.5
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
with:
publish-dir: './build'
production-branch: 'master'
deploy-message: 'Deploy from GitHub Actions'
if: github.repository == 'NixOS/nixos-search'

29 changes: 29 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "Build & Deploy to Netlify"
on:
pull_request:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checking out the repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Installing Nix
uses: cachix/install-nix-action@v8
- name: Building search.nixos.org
run: nix-shell --run "yarn prod"
- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v1.0.5
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
with:
publish-dir: './dist'
production-branch: 'master'
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: 'Deploy from GitHub Actions'
if: github.repository == 'NixOS/nixos-search'
10 changes: 8 additions & 2 deletions src/Main.elm
Original file line number Diff line number Diff line change
@@ -532,7 +532,11 @@ searchPage model =
searchPageResult model.showDetailsFor result.hits

R.Failure error ->
div [] [ text "Error!", pre [] [ text (Debug.toString error) ] ]
div []
[ text "Error!"

--, pre [] [ text (Debug.toString error) ]
]
]


@@ -560,7 +564,9 @@ searchPageResultItem showDetailsFor item =
let
packageDetails =
if Just item.id == showDetailsFor then
[ td [ colspan 4 ] [ text "works!" ] ]
[ td [ colspan 4 ]
[]
]

else
[]