Merge branch 'main' of github.com:HeliosLang/website #49
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: Build and publish the Helios website | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20.x] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Preinstall PNPM | |
| run: npm i -g pnpm@9.9.0 | |
| - name: Detect package manager | |
| id: detect-package-manager | |
| run: | | |
| echo "manager=pnpm" >> $GITHUB_OUTPUT | |
| echo "command=install" >> $GITHUB_OUTPUT | |
| echo "runner=pnpm" >> $GITHUB_OUTPUT | |
| exit 0 | |
| - name: Install deps with package manager | |
| run: ${{ steps.detect-package-manager.outputs.runner }} ${{ steps.detect-package-manager.outputs.command }} | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: ${{ steps.detect-package-manager.outputs.manager }} | |
| - name: Build docusaurus site | |
| run: pnpm run build | |
| - name: Upload artifacts | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: "./dist" | |
| - name: Deploy page | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |