Skip to content

docs: version doc

docs: version doc #42

Workflow file for this run

name: Surge PR Preview
on:
pull_request:
types: [opened, synchronize, reopened]
push:
jobs:
preview:
runs-on: ubuntu-latest
outputs:
preview_url: https://${{ steps.preview_step.outputs.preview_url }}
permissions:
pull-requests: write # allow surge-preview to create/update PR comments
steps:
- uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/[email protected]
with:
version: 6
- name: Setup Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'pnpm'
- run: pnpm start
- uses: afc163/surge-preview@v1
id: preview_step
with:
surge_token: ${{ secrets.SURGE_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
dist: packages/ossa-demo/dist
build: |
pnpm build
pnpm build:demo:vercel
- name: Get the preview_url
run: echo "url => ${{ steps.preview_step.outputs.preview_url }}"
e2e:
if: contains(needs.preview.outputs.preview_url, 'surge')
needs: preview
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/[email protected]
with:
version: 6
- name: Setup Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'pnpm'
- run: pnpm start
- name: e2e test
run: pnpm test -- -- --config baseUrl=${{ needs.preview.outputs.preview_url }}
- uses: actions/upload-artifact@v2
if: failure()
with:
retention-days: 1
path: |
packages/ossa-demo/test/e2e/screenshots