Skip to content

Commit

Permalink
move build under cicd.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Jord-Gui committed Oct 3, 2023
1 parent 1aad378 commit c4c1601
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 65 deletions.
63 changes: 0 additions & 63 deletions .github/workflows/blob-storage-website-ci.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/build-static-site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build Next.js static site

on: workflow_call

# Sets permissions of the GITHUB_TOKEN
permissions:
contents: read
checks: write
id-token: write

# Set working directory
defaults:
run:
working-directory: ./docs

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Bun
uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: bun install
- name: Build with Next.js
run: bun run build
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
path: ./docs/out
10 changes: 8 additions & 2 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: CICD Pipeline

on:
push:
branches: ["main"]
# branches: ["main"]
paths-ignore:
- .gitignore
- "docs/**"
# - "docs/**"

workflow_dispatch:

Expand All @@ -21,4 +21,10 @@ jobs:
with:
environment: prod
secrets: inherit

build-prod:
uses: ./.github/workflows/build-static-site.yml
with:
environment: prod
secrets: inherit

0 comments on commit c4c1601

Please sign in to comment.