mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
86283342f9
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](9bb56186c3...1d96c772d1
)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
75 lines
2.4 KiB
YAML
75 lines
2.4 KiB
YAML
name: Verdaccio Website CI
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: '0 0 * * *'
|
|
|
|
permissions:
|
|
contents: read # to fetch code (actions/checkout)
|
|
|
|
jobs:
|
|
build:
|
|
permissions:
|
|
contents: read # to fetch code (actions/checkout)
|
|
deployments: write
|
|
pull-requests: write # to comment on pull-requests
|
|
|
|
runs-on: ubuntu-latest
|
|
name: setup verdaccio
|
|
services:
|
|
verdaccio:
|
|
image: verdaccio/verdaccio:5
|
|
ports:
|
|
- 4873:4873
|
|
env:
|
|
NODE_ENV: production
|
|
env:
|
|
NODE_OPTIONS: --max_old_space_size=4096
|
|
steps:
|
|
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v3
|
|
|
|
- name: Node
|
|
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
|
with:
|
|
node-version-file: '.nvmrc'
|
|
- name: Install pnpm
|
|
run: |
|
|
corepack enable
|
|
corepack install
|
|
- name: set store
|
|
run: |
|
|
mkdir ~/.pnpm-store
|
|
pnpm config set store-dir ~/.pnpm-store
|
|
- name: Install
|
|
run: pnpm install --registry http://localhost:4873
|
|
- name: Cache .pnpm-store
|
|
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v3
|
|
with:
|
|
path: ~/.pnpm-store
|
|
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
pnpm-
|
|
- name: Build
|
|
run: pnpm build
|
|
- name: Build Translations percentage
|
|
run: pnpm --filter @verdaccio/crowdin-translations build
|
|
- name: Cache Docusaurus Build
|
|
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v3
|
|
with:
|
|
path: website/node_modules/.cache/webpack
|
|
key: cache/webpack-${{github.ref}}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
restore-keys: cache/webpack-${{github.ref}}
|
|
- name: Build Production
|
|
if: (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'workflow_dispatch'
|
|
env:
|
|
CROWDIN_VERDACCIO_API_KEY: ${{ secrets.CROWDIN_VERDACCIO_API_KEY }}
|
|
SENTRY_KEY: ${{ secrets.SENTRY_KEY }}
|
|
CONTEXT: production
|
|
run: pnpm --filter @verdaccio/website netlify:build
|
|
- name: Deploy to Netlify
|
|
env:
|
|
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
|
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
|
run: pnpm --filter ...@verdaccio/website netlify:deploy
|
|
|