fix(exam): 修正2025高一竞赛试卷答案格式并补充缺失解析 #9
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 deploy | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| DART_SASS_VERSION: 1.97.1 | |
| GO_VERSION: 1.25.5 | |
| HUGO_VERSION: 0.154.2 | |
| NODE_VERSION: 24.12.0 | |
| TZ: Europe/Oslo | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| cache: false | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| - name: Setup Pages | |
| id: pages | |
| uses: actions/configure-pages@v5 | |
| - name: Create directory for user-specific executable files | |
| run: | | |
| mkdir -p "${HOME}/.local" | |
| - name: Install Dart Sass | |
| run: | | |
| curl -sLJO "https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz" | |
| tar -C "${HOME}/.local" -xf "dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz" | |
| rm "dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz" | |
| echo "${HOME}/.local/dart-sass" >> "${GITHUB_PATH}" | |
| - name: Setup Hugo | |
| uses: peaceiris/actions-hugo@v3 | |
| with: | |
| hugo-version: 'latest' | |
| extended: true | |
| - name: Verify installations | |
| run: | | |
| echo "Dart Sass: $(sass --version)" | |
| echo "Go: $(go version)" | |
| echo "Hugo: $(hugo version)" | |
| echo "Node.js: $(node --version)" | |
| - name: Install Node.js dependencies | |
| run: | | |
| [[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true | |
| - name: Configure Git | |
| run: | | |
| git config core.quotepath false | |
| - name: Cache restore | |
| id: cache-restore | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ${{ runner.temp }}/hugo_cache | |
| key: hugo-${{ github.run_id }} | |
| restore-keys: | |
| hugo- | |
| - name: Build the site | |
| run: | | |
| hugo \ | |
| --gc \ | |
| --minify \ | |
| --baseURL "${{ steps.pages.outputs.base_url }}/" \ | |
| --cacheDir "${{ runner.temp }}/hugo_cache" | |
| - name: Cache save | |
| id: cache-save | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: ${{ runner.temp }}/hugo_cache | |
| key: ${{ steps.cache-restore.outputs.cache-primary-key }} | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./public | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |