Skip to content

Commit

Permalink
Fix pipeline by storing artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
Tugark committed Feb 13, 2024
1 parent 9bd77b4 commit 58aaefb
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
on:
workflow_call:
inputs:
store-artifact:
description: 'Whether the built artifact should be stored'
default: false
required: false
type: boolean

jobs:
build:
Expand All @@ -14,4 +20,10 @@ jobs:
- name: Install dependencies
run: npm ci
- name: Build app
run: npm run build
run: npm run build
- name: Archive build artifacts
if: ${{ inputs.store-artifact }}
uses: actions/upload-artifact@v2
with:
name: built-app
path: ./build
8 changes: 8 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ on:
push:
branches:
- main
- feature/fix-pipeline-empty # todo: only for testing
jobs:
build:
name: Check Build
uses: ./.github/workflows/build.yml
with:
store-artifact: true

deploy:
permissions:
Expand All @@ -17,6 +20,11 @@ jobs:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: built-app
path: ./build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
Expand Down

0 comments on commit 58aaefb

Please sign in to comment.