name: Pre-release on: push: branches: - release-please-* jobs: check-changes: name: Check which packages changed runs-on: ubuntu-latest outputs: changes: ${{ steps.changes.outputs.changes }} steps: - name: Check out repository uses: actions/checkout@v3.3.0 with: fetch-depth: 2 - name: Detect changed packages uses: dorny/paths-filter@v2.11.1 id: changes with: filters: | puppeteer: - '.github/workflows/ci.yml' - 'packages/puppeteer/**' - 'packages/puppeteer-core/**' - 'docker/**' - 'test/**' - 'test-d/**' - 'tools/mochaRunner/**' pre-release: if: | startsWith(github.event.head_commit.message, 'chore: release main') && contains(fromJSON(needs.check-changes.outputs.changes), 'puppeteer') runs-on: ubuntu-latest permissions: contents: write steps: - name: Check out repository uses: actions/checkout@v3.3.0 with: ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} - name: Install dependencies run: npm install - name: Build env: PUBLISH: 1 run: | npm run docs - name: Version docs working-directory: ./website run: | npm install npm run docusaurus docs:version $(jq -r .version ../packages/puppeteer/package.json) npm run archive - name: Re-build docs after versioning env: PUBLISH: 1 run: | npm run docs - name: Format run: npm run format - name: Install to refresh package-lock run: npm install - name: Commit run: | git config --global user.name 'release-please[bot]' git config --global user.email '55107282+release-please[bot]@users.noreply.github.com' git add . git commit -m 'chore: generate versioned docs' git push --no-verify