Merge pull request #14 from ntnn/switch-pages-from-branch #28
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: pages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: write # to write the built page to the branch | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - uses: actions/configure-pages@v4 | |
| - run: npm ci | |
| - run: npm run build | |
| - uses: rossjrw/pr-preview-action@v1 | |
| if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' }} | |
| with: | |
| source-dir: .vitepress/dist |