Merge pull request #422 from convertcom/release-please--branches--main #122
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Updating Github pages | |
| on: | |
| push: | |
| branches: [main] | |
| jobs: | |
| # This workflow contains a single job called "build" | |
| update-pages: | |
| # The type of runner that the job will run on | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node: [22] | |
| # Steps represent a sequence of tasks that will be executed as part of the job | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - name: Setup Yarn | |
| run: | | |
| corepack enable | |
| corepack prepare yarn@4.10.3 --activate | |
| - name: Install needed libraries and packages | |
| run: | | |
| wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
| sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' | |
| sudo apt-get update | |
| sudo apt-get install -y google-chrome-stable | |
| - name: Installing npm packages | |
| run: yarn install --immutable | |
| - name: Install Playwright browsers | |
| run: | | |
| cd packages/js-sdk | |
| yarn playwright install --with-deps chromium | |
| - name: Generating coverage and docs | |
| run: | | |
| cd packages/js-sdk | |
| yarn build | |
| yarn test | |
| - name: Checkout gh-pages | |
| uses: actions/checkout@v3 | |
| with: | |
| ref: gh-pages | |
| path: gh-pages | |
| - name: Copy docs to gh-pages | |
| run: cp -r packages/js-sdk/docs gh-pages/ | |
| - name: Commit changes to gh-pages Badges | |
| uses: stefanzweifel/git-auto-commit-action@v4 | |
| with: | |
| commit_message: "Updating pages..." | |
| skip_fetch: true | |
| skip_checkout: true | |
| repository: gh-pages |