puppeteer/.github/workflows/pre-release.yml

55 lines
1.4 KiB
YAML
Raw Normal View History

2022-05-31 12:43:46 +00:00
name: Pre-release
permissions: read-all
on:
push:
2022-05-31 12:57:47 +00:00
branches:
- release-please-*
jobs:
check-changes:
uses: ./.github/workflows/changed-packages.yml
2022-05-31 12:55:46 +00:00
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:
2022-10-06 10:44:45 +00:00
- name: Check out repository
uses: actions/checkout@v3.3.0
2022-06-01 13:49:41 +00:00
with:
2022-06-01 13:59:20 +00:00
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Install dependencies
run: npm install
- name: Build
env:
PUBLISH: 1
run: |
2022-07-01 11:52:39 +00:00
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
2022-07-06 07:15:12 +00:00
- name: Format
run: npm run format
- name: Install to refresh package-lock
run: npm install
2022-06-01 13:49:41 +00:00
- name: Commit
run: |
2022-06-01 13:49:41 +00:00
git config --global user.name 'release-please[bot]'
git config --global user.email '55107282+release-please[bot]@users.noreply.github.com'
2022-07-01 11:52:39 +00:00
git add .
2022-07-01 14:00:27 +00:00
git commit -m 'chore: generate versioned docs'
2022-06-01 14:02:06 +00:00
git push --no-verify