π Release #7
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: π Release | |
on: | |
workflow_dispatch: | |
jobs: | |
ci: | |
uses: ./.github/workflows/__shared-ci.yml | |
secrets: inherit | |
release: | |
name: π Release | |
needs: ci | |
runs-on: ubuntu-latest | |
environment: github-pages | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: hoverkraft-tech/ci-github-nodejs/actions/setup-node@0.6.0 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: build | |
path: / | |
- uses: googleapis/release-please-action@v4 | |
id: release | |
with: | |
release-type: node | |
target-branch: main | |
skip-github-release: true | |
- name: π¦ Publish NPM packages | |
if: ${{ steps.release.outputs.release_created }} | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} | |
run: yarn publish --access public | |
docs-publish: | |
name: π Publish documentation | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
needs: ci | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: build | |
path: / | |
- run: | | |
mkdir ./_site_tmp | |
echo -e "theme: jekyll-theme-cayman" > ./_site_tmp/_config.yml | |
cp README.md ./_site_tmp/index.md | |
cp -R docs ./_site_tmp/ | |
cp -R build/docs ./_site_tmp/typedoc | |
- name: βοΈ Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Build with Jekyll | |
uses: actions/jekyll-build-pages@v1 | |
with: | |
source: _site_tmp | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
- name: π Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |