Merge pull request #15 from EDAcation/feat/migrate-docusaurus #6
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 & deploy | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - "*" | |
| permissions: | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: true | |
| steps: | |
| - name: Checkout Source | |
| uses: actions/checkout@v6 | |
| - name: Install Nix | |
| uses: DeterminateSystems/nix-installer-action@v22 | |
| - name: Enable Nix cache | |
| uses: DeterminateSystems/magic-nix-cache-action@v13 | |
| - name: Install Dependencies | |
| run: nix develop --command npm ci | |
| - name: Build website | |
| run: nix develop --command npm run build | |
| - name: Upload static files as artifact | |
| uses: actions/upload-pages-artifact@v5 | |
| with: | |
| name: static-files | |
| path: build/ | |
| publish: | |
| name: Publish | |
| needs: | |
| - build | |
| if: github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Source | |
| uses: actions/checkout@v6 | |
| - name: Deploy to Github Pages | |
| uses: actions/deploy-pages@v5 | |
| with: | |
| artifact_name: static-files |