Update intel action in workflow and pin version. #1168
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
| # Workflow to build and deploy FORD docs for FTorch | |
| name: Build docs | |
| # Controls when the workflow will run | |
| on: | |
| # Triggers the workflow on pushes to the "main" branch, i.e., PR merges | |
| push: | |
| branches: [ "main"] | |
| # Triggers the workflow on pushes to open pull requests to main with documentation changes | |
| pull_request: | |
| branches: [ "main" ] | |
| paths: | |
| - '.github/workflows/build_docs.yml' | |
| - '**.md' | |
| - 'pages/*' | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| # Cancel jobs running if new commits are pushed | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| # No write permission by default | |
| permissions: {} | |
| # Workflow run - one or more jobs that can run sequentially or in parallel | |
| jobs: | |
| # The first job in this workflow builds the documentation for the website | |
| build-docs: | |
| name: build docs | |
| if: github.ref != 'refs/heads/main' | |
| # The type of runner that the job will run on | |
| runs-on: ubuntu-latest | |
| # Terminate the job if it runs for more than 5 minutes | |
| timeout-minutes: 5 | |
| # Steps represent a sequence of tasks that will be executed as part of the job | |
| steps: | |
| - name: Install Graphviz (Required by FORD) | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y graphviz | |
| # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
| - name: Checkout FTorch repository | |
| with: | |
| persist-credentials: true | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Setup Python | |
| uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6 | |
| with: | |
| python-version: '3.13' # Use 3.13 as no PyTorch wheels for 3.14 yet. | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install --group docs | |
| - name: Build docs with FORD | |
| run: ford FTorch.md | |
| - name: Test docs build | |
| uses: JamesIves/github-pages-deploy-action@6c2d9db40f9296374acc17b90404b6e8864128c8 # v4 | |
| with: | |
| branch: docs-test # The branch the action should deploy to. | |
| folder: doc # The folder the action should deploy. | |
| dry-run: true # Don't actually push to pages, just test if we can | |
| # The second job in this workflow publishes the website in the case of a merge into main | |
| publish-website: | |
| name: publish website | |
| if: github.ref == 'refs/heads/main' | |
| # The type of runner that the job will run on | |
| runs-on: ubuntu-latest | |
| # We trust the deploy action with write permissions | |
| permissions: | |
| contents: write # We trust the deploy action with write permissions | |
| id-token: write # We trust the deploy action with write permissions | |
| # Terminate the job if it runs for more than 5 minutes | |
| timeout-minutes: 5 | |
| # Steps represent a sequence of tasks that will be executed as part of the job | |
| steps: | |
| - name: Install Graphviz (Required by FORD) | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y graphviz | |
| # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
| - name: Checkout FTorch repository | |
| with: | |
| persist-credentials: true | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Setup Python | |
| uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6 | |
| with: | |
| python-version: '3.13' # Use 3.13 as no PyTorch wheels for 3.14 yet. | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install --group docs | |
| - name: Build docs with FORD | |
| run: ford FTorch.md | |
| - name: Deploy Documentation for main | |
| uses: JamesIves/github-pages-deploy-action@6c2d9db40f9296374acc17b90404b6e8864128c8 # v4 | |
| with: | |
| branch: gh-pages # The branch the action should deploy to. | |
| folder: doc # The folder the action should deploy. |