Skip to content

Commit

Permalink
ci: using overwrite
Browse files Browse the repository at this point in the history
  • Loading branch information
Kezhik Kyzyl-ool committed Apr 22, 2024
1 parent b4bb690 commit e520c31
Showing 1 changed file with 34 additions and 4 deletions.
38 changes: 34 additions & 4 deletions .github/workflows/pr-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,39 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- uses: gravity-ui/preview-build-action@v1
- name: Checkout
uses: actions/checkout@v3
with:
node-version: 18
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node-version }}
- name: Install Packages
run: npm ci
shell: bash
- name: Build Storybook
run: "npx --no-install build-storybook || npx --no-install sb build"
shell: bash
- name: Create Static Artifact
uses: actions/upload-artifact@v3
with:
name: static
path: ./storybook-static
- name: Save PR ID
run: |
pr="${{ inputs.pr }}"
if [[ -z "$pr" ]]; then
pr="${{ github.event.pull_request.number }}"
fi
echo $pr > ./pr-id.txt
shell: bash
- name: Create PR Artifact
uses: actions/upload-artifact@v3
with:
name: pr
path: ./pr-id.txt
overwrite: true
deploy:
name: Deploy
needs: build
Expand All @@ -19,8 +49,8 @@ jobs:
- name: Download Artifacts
uses: dawidd6/action-download-artifact@v2
with:
workflow: ${{ github.event.workflow_run.id }}
check_artifacts: true
workflow: ${{ github.event.workflow_run.workflow_id }}
run_id: ${{ github.event.workflow_run.id }}
- name: Extract PR Number
id: pr
run: echo "::set-output name=id::$(<pr/pr-id.txt)"
Expand Down

0 comments on commit e520c31

Please sign in to comment.