Skip to content

Commit

Permalink
feat(site): prod deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
cor committed Sep 27, 2023
1 parent c082e9b commit d42c72e
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docs
name: Deploy Docs

on:
push:
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/site-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Deploy Site

on:
push:
branches:
- main

env:
ARTIFACT_NAME: BUILD_LOG
NIX_VERSION: nix-2.14.1
NIXPKGS_CHANNEL: nixos-22.11

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

jobs:
deploy:
runs-on: beefy-runner
permissions: write-all
steps:
- uses: actions/checkout@v3
with:
lfs: true
- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:${{ env.NIXPKGS_CHANNEL }}
github_access_token: ${{ github.token }}
extra_nix_config: |
trusted-public-keys = union.cachix.org-1:TV9o8jexzNVbM1VNBOq9fu8NK+hL6ZhOyOh0quATy+M= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
substituters = https://union.cachix.org/ https://cache.nixos.org/
- run: |
nix-channel --add https://nixos.org/channels/${{ env.NIXPKGS_CHANNEL }} nixpkgs
nix-channel --update
nix-env -iA nixpkgs.nodePackages.vercel
- name: "Publish Preview to Vercel"
id: publish-preview
run: |
cd site
export VERCEL_ORG_ID=team_lY7Vs9wFi3Ifb2A24bOxiA68
export VERCEL_PROJECT_ID=prj_HWQLgBiGFHNPSy5qJ3WpCeX1l492
vercel pull --yes --environment=production --token=${{secrets.VERCEL_TOKEN}} --scope unionbuild
vercel build --token=${{secrets.VERCEL_TOKEN}} --prod --scope unionbuild
vercel deploy --prebuilt --prod --token=${{secrets.VERCEL_TOKEN}} --scope unionbuild

0 comments on commit d42c72e

Please sign in to comment.