0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-02-03 23:09:17 -05:00
verdaccio/.github/workflows/website.yml
renovate[bot] 319b3847f3
chore(deps): update all actions (#5027)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-29 22:03:29 +01:00

60 lines
2.1 KiB
YAML

name: Verdaccio Website CI
on:
workflow_dispatch:
schedule:
- cron: '0 2 * * 0' # every Sunday at 2am UTC (10pm EST)
permissions:
contents: read # to fetch code (actions/checkout)
concurrency:
group: website-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
permissions:
contents: read # to fetch code (actions/checkout)
deployments: write
pull-requests: write # to comment on pull-requests
runs-on: ubuntu-latest
if: github.repository == 'verdaccio/verdaccio'
name: setup verdaccio
services:
verdaccio:
image: verdaccio/verdaccio:6
ports:
- 4873:4873
env:
NODE_ENV: production
env:
NODE_OPTIONS: --max_old_space_size=4096
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Build application with Node 20
uses: ./.github/actions/build-app
with:
node-version: 20
- name: Build Translations percentage
run: pnpm --filter @verdaccio/crowdin-translations build
- name: Cache Docusaurus Build
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
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
if: (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'workflow_dispatch'
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
run: pnpm --filter ...@verdaccio/website netlify:deploy