mirror of
https://github.com/foo-dogsquared/website.git
synced 2025-01-31 07:58:02 +00:00
Make separate build step in CI for drafts
This commit is contained in:
parent
beb2efd291
commit
744b834491
31
.github/workflows/build-drafts.yml
vendored
Normal file
31
.github/workflows/build-drafts.yml
vendored
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
name: "Build and deploy drafted versions to Netlify"
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- drafts/*
|
||||||
|
- content/*
|
||||||
|
workflow_run:
|
||||||
|
workflows:
|
||||||
|
- "Update webring"
|
||||||
|
types:
|
||||||
|
- "completed"
|
||||||
|
env:
|
||||||
|
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_ACCESS_TOKEN }}
|
||||||
|
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- uses: cachix/install-nix-action@v20
|
||||||
|
with:
|
||||||
|
nix_path: nixpkgs=channel:nixpkgs-unstable
|
||||||
|
- name: Fetch all 'content/' branches
|
||||||
|
run: |
|
||||||
|
git fetch origin +refs/heads/content/*:refs/heads/content/*
|
||||||
|
- run: |
|
||||||
|
nix develop
|
||||||
|
make build-draft
|
||||||
|
netlify deploy --context branch-deploy
|
24
.github/workflows/build.yml
vendored
24
.github/workflows/build.yml
vendored
@ -9,6 +9,9 @@ on:
|
|||||||
- "Update webring"
|
- "Update webring"
|
||||||
types:
|
types:
|
||||||
- "completed"
|
- "completed"
|
||||||
|
env:
|
||||||
|
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_ACCESS_TOKEN }}
|
||||||
|
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -22,20 +25,7 @@ jobs:
|
|||||||
- 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/*
|
||||||
- run: nix develop -c make build
|
- run: |
|
||||||
- name: Deploy to Netlify
|
nix develop
|
||||||
uses: nwtgck/actions-netlify@v2
|
make build
|
||||||
with:
|
netlify deploy
|
||||||
publish-dir: ./public
|
|
||||||
netlify-config-path: ./netlify.toml
|
|
||||||
production-branch: master
|
|
||||||
production-deploy: ${{ github.ref_name == 'master' }}
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
deploy-message: "Deploy from GitHub Actions"
|
|
||||||
enable-pull-request-comment: true
|
|
||||||
enable-commit-comment: true
|
|
||||||
enable-commit-status: true
|
|
||||||
overwrites-pull-request-comment: false
|
|
||||||
env:
|
|
||||||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_ACCESS_TOKEN }}
|
|
||||||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user