Download .github/workflows/github-pages.yml from dqy08/InfoLens: direct link, hf CLI and curl.
- Browser
- Download file 1.06 kB
-
https://huggingface.co/spaces/dqy08/InfoLens/resolve/main/.github/workflows/github-pages.yml
- Command line
-
hf download hf://spaces/dqy08/InfoLens/.github/workflows/github-pages.yml
-
curl -L -o github-pages.yml https://huggingface.co/spaces/dqy08/InfoLens/resolve/main/.github/workflows/github-pages.yml
1.06 kB
| name: Deploy GitHub Pages | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| jobs: | |
| deploy: | |
| # 只在公开仓运行;私有仓 main 是开发主线,不能同步出去。 | |
| if: github.repository == 'dqy08/InfoLens' | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: npm | |
| cache-dependency-path: client/src/package-lock.json | |
| - name: Build static site | |
| run: cd client/src && npm ci && npm run build:github-pages | |
| - name: Disable Jekyll | |
| run: touch client/dist-github_pages/.nojekyll | |
| - uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: client/dist-github_pages | |
| - uses: actions/deploy-pages@v4 | |
| id: deployment | |