pages #1018
This file contains 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: pages | |
on: | |
pull_request: | |
push: | |
schedule: | |
- cron: "0 3 * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- id: deploy-on-push | |
run: | |
echo "::set-output name=result::${{ env.DEPLOY_BRANCH }}" | |
env: | |
DEPLOY_BRANCH: ${{ secrets.DEPLOY_BRANCH && contains(github.ref, secrets.DEPLOY_BRANCH) && 1 || 0 }} | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: environment.yaml | |
- name: Build pages | |
run: | | |
make gettext html | |
- name: Create nojekyll file | |
run: | | |
touch _build/.nojekyll | |
- name: Create CNAME file | |
run: | | |
if [ ! -z ${CNAME// } ]; then | |
echo ${CNAME} > _build/CNAME | |
fi | |
env: | |
CNAME: ${{ secrets.CNAME }} | |
- uses: JamesIves/[email protected] | |
if: ${{ github.event_name == 'push' && steps.deploy-on-push.outputs.result != 0 }} | |
with: | |
branch: gh-pages | |
folder: _build/html | |
single-commit: true | |
git-config-email: [email protected] | |
git-config-name: Fortran |