Skip to content

Bump JamesIves/github-pages-deploy-action from 4.6.4 to 4.6.8 #729

Bump JamesIves/github-pages-deploy-action from 4.6.4 to 4.6.8

Bump JamesIves/github-pages-deploy-action from 4.6.4 to 4.6.8 #729

Workflow file for this run

# Github action to build preview sphinx site and commit to gh-pages branch
# Built site is pushed to 'gh-pages' branch
#
name: Sphinx Preview Build
on:
issue_comment:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
if: github.event.issue.pull_request && contains(github.event.comment.body, '#build')
steps:
- name: Checkout pr/${{github.event.issue.number}}
uses: actions/checkout@v4
- name: Fetch pr/${{github.event.issue.number}}
run: |
git fetch origin pull/${{github.event.issue.number}}/head:pr-${{github.event.issue.number}}
git checkout pr-${{github.event.issue.number}}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install sphinx
run: pip3 install --user -r requirements.txt
- name: Safe workflow for build preview
run: if [ -d "build" ]; then rm -Rf build; fi
- name: Build page
if: contains(github.event.comment.body, '#build_preview')
run: python3 build.py en
- name: Build page translations
if: contains(github.event.comment.body, '#build_translation')
run: python3 build.py
- run: touch build/html/.nojekyll
- name: Deploy documentation sphinx
uses: JamesIves/github-pages-deploy-action@v4.6.4
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
target-folder: pr/${{github.event.issue.number}}
folder: build/html
clean: false
git-config-email: 53436240+fortran-lang@users.noreply.github.com
git-config-name: Fortran
- name: Comment on pull request
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{github.event.issue.number}}
body: "This PR has been built with Sphinx and can be previewed at: https://fortran-lang.github.io/webpage/pr/${{github.event.issue.number}}"