Skip to content

docs: add snyder as sponsor to the doc website #2382

docs: add snyder as sponsor to the doc website

docs: add snyder as sponsor to the doc website #2382

Workflow file for this run

name: ci
on:
push:
branches:
- beta
- main
pull_request: {}
env:
DOCS_APP_ARTIFACT_NAME: docs-app
DOCS_APP_PATH: dist/apps/docs-app/
NODE_OPTIONS: --max-old-space-size=6144
VITE_ANALOG_PUBLIC_BASE_URL: ${{ vars.VITE_ANALOG_PUBLIC_BASE_URL || 'http://localhost:3000' }}
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true
jobs:
prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version-file: .node-version
- run: corepack enable
- run: pnpm --version
- uses: actions/setup-node@v3
with:
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'
- name: Install
run: pnpm install --frozen-lockfile --prefer-offline
- name: Validate
run: pnpm exec prettier --check .
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: .node-version
- run: corepack enable
- run: pnpm --version
- uses: actions/setup-node@v3
with:
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'
- name: Install
run: pnpm install --frozen-lockfile --prefer-offline
- name: Build
run: pnpm build
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: .node-version
- run: corepack enable
- run: pnpm --version
- uses: actions/setup-node@v3
with:
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'
- name: Install
run: pnpm install --frozen-lockfile --prefer-offline
- name: Build
run: pnpm build
- name: Verify
run: more dist\apps\blog-app\analog\public\index.html
unit:
runs-on: ubuntu-latest
needs:
- build
- build-windows
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: .node-version
- run: corepack enable
- run: pnpm --version
- uses: actions/setup-node@v3
with:
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'
- name: Install
run: pnpm install --frozen-lockfile --prefer-offline
- name: Test
run: pnpm test
e2e:
runs-on: ubuntu-latest
needs:
- build
- build-windows
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: .node-version
- run: corepack enable
- run: pnpm --version
- uses: actions/setup-node@v3
with:
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'
- name: Install
run: pnpm install --frozen-lockfile --prefer-offline
- name: Install Playwright
run: npx playwright install --with-deps
- name: Install Cypress
run: npx cypress install
- name: End-to-end test
run: pnpm e2e
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: .node-version
- run: corepack enable
- run: pnpm --version
- uses: actions/setup-node@v3
with:
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'
- name: Install
run: pnpm install --frozen-lockfile --prefer-offline
- name: Build
run: pnpm exec nx build docs-app
- name: Upload docs website
# Runs on merge to the `beta` branch
if: github.event_name == 'push' && github.ref_name == 'beta'
uses: actions/upload-artifact@v3
with:
if-no-files-found: error
name: ${{ env.DOCS_APP_ARTIFACT_NAME }}
path: ${{ env.DOCS_APP_PATH }}
retention-days: 1
deploy-docs:
name: '[Merge] Deploy docs website'
needs:
- build
- build-windows
- unit
- e2e
- docs
# Runs on merge to the `beta` branch
if: github.event_name == 'push' && github.ref_name == 'beta'
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
# Authorize deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
concurrency:
# Group concurrency on workflow, then:
# - Is merge run? Group on branch name (`refs/heads/beta`)
# - Is pull request? Group on pull request branch name, for example `feat/add-awesome-feature`
group: >-
${{ github.workflow }}-deploy-docs-${{
github.event_name == 'push'
&& github.ref
|| github.head_ref
}}
# Run merge workflows in sequence to prevent parallel deployments and releases
# Cancel stale pull request runs in progress for the same branch
cancel-in-progress: ${{ github.event_name != 'push' }}
steps:
- name: Download docs website
uses: actions/download-artifact@v3
with:
name: ${{ env.DOCS_APP_ARTIFACT_NAME }}
path: ${{ env.DOCS_APP_PATH }}
- name: Set up GitHub Pages
uses: actions/configure-pages@v1
- name: Upload GitHub Pages-compatible tarball
uses: actions/upload-pages-artifact@v1
with:
path: ${{ env.DOCS_APP_PATH }}
- name: Deploy docs website tarball
id: deploy
uses: actions/deploy-pages@v1