mirror of
https://github.com/foo-dogsquared/website.git
synced 2025-02-07 12:19:36 +00:00
Separate build and deploy step
Might not be so good now that the gems are not local. Plus it's giving me errors.
This commit is contained in:
parent
4d90a1bfb1
commit
bf1bcb8f9e
24
.github/workflows/build.yml
vendored
24
.github/workflows/build.yml
vendored
@ -16,6 +16,9 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
id-token: "write"
|
||||||
|
contents: "read"
|
||||||
steps:
|
steps:
|
||||||
- name: Fetch/cache the fetched URIs
|
- name: Fetch/cache the fetched URIs
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
@ -23,20 +26,27 @@ jobs:
|
|||||||
key: open-uri-content-cache
|
key: open-uri-content-cache
|
||||||
path: |
|
path: |
|
||||||
/tmp/open-uri-cache-foodogsquared-website
|
/tmp/open-uri-cache-foodogsquared-website
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: cachix/install-nix-action@v20
|
|
||||||
with:
|
- uses: DeterminateSystems/nix-installer-action@v7
|
||||||
nix_path: nixpkgs=channel:nixpkgs-unstable
|
|
||||||
- name: Fetch all 'content/' branches
|
- name: Fetch all 'content/' branches
|
||||||
run: |
|
run: |
|
||||||
git fetch origin +refs/heads/content/*:refs/heads/content/*
|
git fetch origin +refs/heads/content/*:refs/heads/content/*
|
||||||
|
|
||||||
- if: github.ref_name == 'master'
|
- if: github.ref_name == 'master'
|
||||||
name: Build and deploy site
|
name: Deploy site to Netlify
|
||||||
run: |
|
run: |
|
||||||
nix develop --command bash -c "netlify deploy --build --prod"
|
nix develop
|
||||||
|
rake build[production]
|
||||||
|
netlify deploy --prod --dir ./public
|
||||||
|
|
||||||
- if: startsWith('drafts/', github.ref_name)
|
- if: startsWith('drafts/', github.ref_name)
|
||||||
name: Build and deploy draft versions of the site
|
name: Deploy draft versions of the site to Netlify
|
||||||
run: |
|
run: |
|
||||||
nix develop --command bash -c "netlify deploy --build --context branch-deploy"
|
nix develop
|
||||||
|
rake build[branch-deploy]
|
||||||
|
netlify deploy --context branch-deploy --dir ./public
|
||||||
|
Loading…
Reference in New Issue
Block a user