Skip to content

Commit

Permalink
feat: update github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Wroud committed Sep 12, 2024
1 parent d9774d6 commit ca0db97
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 25 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Not needed if lastUpdated is not enabled

Expand All @@ -32,11 +31,8 @@ jobs:
node-version: "lts/*"
cache: "yarn"

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Install modules
run: yarn install --immutable
- uses: actions/configure-pages@v4
- run: yarn install --immutable

- name: Download build artifacts
uses: actions/download-artifact@v4
Expand All @@ -47,7 +43,6 @@ jobs:

- name: Build
run: yarn run docs:build
working-directory: ./packages/docs

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
Expand All @@ -61,8 +56,6 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
- uses: actions/deploy-pages@v4
id: deployment
uses: actions/deploy-pages@v4
1 change: 0 additions & 1 deletion .github/workflows/coverage-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
- uses: actions/checkout@v4

- name: Sanitize branch name
id: sanitize_branch
run: |
# Replace invalid characters with a dash '-'
SANITIZED_BRANCH=$(echo "${{ github.event.workflow_run.head_branch }}" | sed 's/[\/\\:*?"<>|]/-/g')
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
with:
build-run-id: ${{ needs.build.outputs.run-id }}

build-docs:
docs:
needs: build
uses: ./.github/workflows/build-docs.yml
secrets: inherit
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ permissions:

jobs:
release:
name: Release
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
Expand All @@ -25,14 +24,14 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: "lts/*"
cache: "yarn"

- name: Install modules
run: yarn install --immutable
- run: yarn install --immutable

- name: Download build artifacts
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -75,8 +74,7 @@ jobs:
yarn config set npmPublishRegistry "https://registry.npmjs.org"
yarn config set npmAuthToken $NPM_AUTH_TOKEN
- name: Install modules
run: yarn install --immutable
- run: yarn install --immutable

- name: Download build artifacts
uses: actions/download-artifact@v4
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,15 @@ jobs:
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20
node-version: "lts/*"
cache: "yarn"

- name: Install modules
run: yarn install --immutable

- name: Build and test modules
run: |
- run: |
yarn install --immutable
yarn build
yarn test:ci
- name: Sanitize branch name
id: sanitize_branch
run: |
# Replace invalid characters with a dash '-'
SANITIZED_BRANCH=$(echo "${{ matrix.branch }}" | sed 's/[\/\\:*?"<>|]/-/g')
Expand Down

0 comments on commit ca0db97

Please sign in to comment.