[blog] Upgrading to Docsy 0.12.0 from 0.11.0 #1117
Workflow file for this run
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
| # Smoke test across OSs: build a Docsy-based site from scratch, | |
| # using Docsy as hugo module and fetching Docsy via NPM. | |
| # cSpell:ignore docsy github | |
| name: smoke | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| # schedule: # midnight every day | |
| # - cron: '0 0 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| new-site: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [windows-latest, ubuntu-latest] | |
| docsy-src: [NPM, HUGO_MODULE] | |
| env: | |
| BASE_REPO: ${{ github.repository }} | |
| BRANCH: ${{ github.head_ref }} | |
| PR_REPO: ${{ github.event.pull_request.head.repo.full_name }} | |
| SHA: ${{ github.sha }} | |
| # TODO: drop PR testing under Windows because it's too slow? | |
| # if: github.event_name != 'pull_request' && matrix.os != 'windows-latest' | |
| if: github.event_name != 'push' || github.repository == 'google/docsy' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: .nvmrc | |
| cache: npm | |
| cache-dependency-path: package.json | |
| - name: Setup workspace | |
| run: | | |
| npm install | |
| mkdir -p tmp && cd tmp && npm init -y | |
| shell: bash | |
| - name: Make site (non-PR) | |
| if: github.event_name != 'pull_request' | |
| working-directory: tmp | |
| run: ../scripts/make-site.sh -s ${{ matrix.docsy-src }} -r $BASE_REPO -v $SHA | |
| shell: bash | |
| - name: Make site from PR | |
| if: github.event_name == 'pull_request' | |
| working-directory: tmp | |
| run: ../scripts/make-site.sh -s ${{ matrix.docsy-src }} -r $PR_REPO -v $BRANCH | |
| shell: bash | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: tmp-site-${{ matrix.os }}-${{ matrix.docsy-src }} | |
| path: | | |
| tmp | |
| !**/node_modules | |
| !**/resources |