ci: uses hoverkraft-tech/ci-github-nodejs #6
Workflow file for this run
This file contains 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: Main - Continuous Integration | |
on: | |
pull_request: | |
branches: [main] | |
push: | |
branches: [main] | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
ci: | |
name: Continuous Integration | |
uses: ./.github/workflows/__shared-ci.yml | |
with: | |
build: '{"artifact":"packages/*/dist"}' | |
npm-packages: | |
name: 📦 Publish NPM packages | |
needs: ci | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: hoverkraft-tech/ci-github-nodejs/actions/[email protected] | |
- uses: actions/download-artifact@v4 | |
with: | |
name: build | |
- env: | |
NPM_TOKEN: ${{secrets.NODE_AUTH_TOKEN}} | |
GH_TOKEN: ${{ secrets.GH_PRIVATE_ACCESS_TOKEN }} | |
run: | | |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc | |
git config --local user.email "${{ github.actor }}@users.noreply.github.com" | |
git config --local user.name "${{ github.actor }}" | |
yarn lerna publish --conventional-commits --create-release github --yes | |
documentation: | |
name: 📚 Publish documentation | |
needs: ci | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
mkdir -p documentation | |
echo "theme: jekyll-theme-cayman" > documentation/_config.yml | |
cp README.md documentation/index.md | |
- uses: actions/configure-pages@v4 | |
- uses: actions/jekyll-build-pages@v1 | |
with: | |
source: documentation/ | |
destination: documentation/_site | |
- uses: actions/upload-pages-artifact@v3 | |
with: | |
path: documentation/_site | |
- name: 🌐 Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |