Skip to content

Commit

Permalink
ci: switch to deploy to Netlify instead of Cloudflare pages (NixOS#772)
Browse files Browse the repository at this point in the history
  • Loading branch information
delroth committed Nov 2, 2023
1 parent 5c0ac8a commit 1e13b61
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 115 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: "Build and Deploy"
on:
push: {}
pull_request: {}

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: cachix/install-nix-action@v23
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v12
with:
name: nix-dev
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: Build
run: |
nix-build
# The netlify action doesn't follow symlinks properly.
mkdir ./dist
cp -RL ./result/* ./dist/
- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v2.0
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
with:
production-branch: 'master'
production-deploy: ${{ github.event_name == 'push' }}
publish-dir: './dist'
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: 'Deploy from GitHub Actions'
enable-pull-request-comment: true
overwrites-pull-request-comment: true
enable-commit-comment: false
enable-commit-status: true
#if: github.repository_owner == 'NixOS'
39 changes: 0 additions & 39 deletions .github/workflows/build.yml

This file was deleted.

76 changes: 0 additions & 76 deletions .github/workflows/deploy.yml

This file was deleted.

0 comments on commit 1e13b61

Please sign in to comment.