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 6bd9da5
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 73 deletions.
32 changes: 32 additions & 0 deletions .github/deploy-preview.yml
Original file line number Diff line number Diff line change
@@ -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.
149 changes: 76 additions & 73 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,91 +4,94 @@ on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened]
types:
- opened
- reopened
- synchronize

# Enabled permissions on GITHUB_TOKEN
permissions:
# To be able to push to the repo
contents: write
# To update the pr description with canary info
pull-requests: write
# For pr-check to create a status
statuses: write
# Needed to create PR statuses/checks
checks: write
# To post comments on PRs
issues: write
# permissions:
# # To be able to push to the repo
# contents: write
# # To update the pr description with canary info
# pull-requests: write
# # For pr-check to create a status
# statuses: write
# # Needed to create PR statuses/checks
# checks: write
# # To post comments on PRs
# issues: write

jobs:
# Run install in one step so deps can be cached for other steps
install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-deps
# - 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/[email protected]
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/[email protected]
# 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 6bd9da5

Please sign in to comment.