Skip to content

Commit

Permalink
preview
Browse files Browse the repository at this point in the history
  • Loading branch information
hipstersmoothie committed Apr 8, 2024
1 parent b79f862 commit 6e36652
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 60 deletions.
32 changes: 32 additions & 0 deletions .github/deploy-preview.yml
@@ -0,0 +1,32 @@
name: Deploy PR previews

on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed

concurrency: preview-${{ github.ref }}

jobs:
deploy-preview:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3

- uses: ./.github/actions/install-deps

- name: Build with Astro
run: |
pnpm astro build \
--site "${{ steps.pages.outputs.origin }}" \
--base "${{ steps.pages.outputs.base_path }}"
working-directory: packages/docs

- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: packages/docs/dist
File renamed without changes.
120 changes: 60 additions & 60 deletions .github/workflows/build.yml
Expand Up @@ -27,68 +27,68 @@ jobs:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-deps

build:
runs-on: ubuntu-latest
needs: install
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-deps
- uses: ./.github/actions/build-cache
- run: yarn build
# build:
# runs-on: ubuntu-latest
# needs: install
# steps:
# - uses: actions/checkout@v3
# - uses: ./.github/actions/install-deps
# - uses: ./.github/actions/build-cache
# - run: yarn build

lint:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-deps
- uses: ./.github/actions/build-cache
- run: yarn lint
# lint:
# runs-on: ubuntu-latest
# needs: build
# steps:
# - uses: actions/checkout@v3
# - uses: ./.github/actions/install-deps
# - uses: ./.github/actions/build-cache
# - run: yarn lint

test-types:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-deps
- uses: ./.github/actions/build-cache
- run: yarn tsTest:custom && yarn tsTest:main
# test-types:
# runs-on: ubuntu-latest
# needs: build
# steps:
# - uses: actions/checkout@v3
# - uses: ./.github/actions/install-deps
# - uses: ./.github/actions/build-cache
# - run: yarn tsTest:custom && yarn tsTest:main

test:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-deps
- uses: ./.github/actions/build-cache
- run: yarn test
# test:
# runs-on: ubuntu-latest
# needs: build
# steps:
# - uses: actions/checkout@v3
# - uses: ./.github/actions/install-deps
# - uses: ./.github/actions/build-cache
# - run: yarn test

test-browser:
runs-on: ubuntu-latest
needs: build
if: ${{ false }} # disable for now
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-deps
- uses: ./.github/actions/build-cache
- run: yarn test:browser --ci
# test-browser:
# runs-on: ubuntu-latest
# needs: build
# if: ${{ false }} # disable for now
# steps:
# - uses: actions/checkout@v3
# - uses: ./.github/actions/install-deps
# - uses: ./.github/actions/build-cache
# - run: yarn test:browser --ci

release:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
needs: build
steps:
- uses: actions/checkout@v3
- uses: 8BitJonny/gh-get-current-pr@2.2.0
id: PR
- uses: ./.github/actions/install-deps
- uses: ./.github/actions/build-cache
- name: Prepare repository
run: git fetch --unshallow --tags
- name: Create Release
run: yarn auto shipit
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PROTECTED_BRANCH_REVIEWER_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
PR: ${{ steps.PR.outputs.number }}
# release:
# runs-on: ubuntu-latest
# if: contains(github.event.head_commit.message , 'ci skip') == false && contains(github.event.head_commit.message , 'skip ci') == false
# needs: build
# steps:
# - uses: actions/checkout@v3
# - uses: 8BitJonny/gh-get-current-pr@2.2.0
# id: PR
# - uses: ./.github/actions/install-deps
# - uses: ./.github/actions/build-cache
# - name: Prepare repository
# run: git fetch --unshallow --tags
# - name: Create Release
# run: yarn auto shipit
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# PROTECTED_BRANCH_REVIEWER_TOKEN: ${{ secrets.GH_TOKEN }}
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# PR: ${{ steps.PR.outputs.number }}

0 comments on commit 6e36652

Please sign in to comment.