Skip to content

Commit

Permalink
ci: Add brace expansion shell option to workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
egeesin committed Feb 2, 2024
1 parent 5d4ba7a commit 6fd2ce6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
pull_request:
branches: [ "main" ]

# defaults:
# run:
# shell: bash --noprofile --norc -eBo pipefail {0}

jobs:
cache-and-install:
runs-on: ubuntu-latest
Expand All @@ -26,7 +30,7 @@ jobs:
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 7
version: latest
run_install: false

- name: Get pnpm store directory
Expand All @@ -42,13 +46,18 @@ jobs:
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Build
- name: Install dependencies
run: |
pnpm i --no-frozen-lockfile
pnpm run build
- name: Build source files
run: |
set -o braceexpand
npm config set script-shell bash
pnpm build
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: dist-without-markdown
name: pxl-dist-prod-artifact
path: dist
9 changes: 5 additions & 4 deletions .github/workflows/deploy-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ jobs:
node-version: 20

- name: Install pnpm
# uses: pnpm/[email protected]
uses: pnpm/action-setup@v2
with:
version: 8
version: latest
run_install: false

- name: Get pnpm store directory
Expand All @@ -40,13 +39,15 @@ jobs:
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile
run: pnpm i --frozen-lockfile

- name: Build
env:
BASE_PATH: '/${{ github.event.repository.name }}'
run: |
pnpm build
set -o braceexpand
npm config set script-shell bash
pnpm run build
- name: Fix permissions
run: |
chmod -c -R +rX ./dist | while read line; do
Expand Down

0 comments on commit 6fd2ce6

Please sign in to comment.