mirror of https://github.com/abinit/abinit.git
75 lines
2.0 KiB
YAML
75 lines
2.0 KiB
YAML
# Taken from https://github.com/mkdocs/mkdocs/discussions/3652
|
|
name: Publish Abinit website
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: ["abinit_web"]
|
|
#paths: # Recommended to avoid extra builds
|
|
# - .github/workflows/your_site_publish_file.yml # Change name to what your workflow file is
|
|
# - docs/**
|
|
# - mkdocs.yml
|
|
# - requirements.txt
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
concurrency:
|
|
group: github-pages
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
build_and_publish:
|
|
# prevent this action from running on forks
|
|
#if: github.repository == 'abinit/abinit'
|
|
runs-on: ubuntu-latest
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0 # Recommended for git localized plugin
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.9"
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install -U pip setuptools
|
|
python -m pip install -r requirements.txt # Define your dependencies in this file.
|
|
|
|
- name: Install autoconf, automake, and m4
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y autoconf automake m4
|
|
#sudo apt-get install -y robodoc
|
|
|
|
- name: Run makemake
|
|
run: ./config/scripts/makemake
|
|
|
|
- name: Build site
|
|
run: ./mksite.py build
|
|
|
|
#- name: Add landing page
|
|
# run: |
|
|
# mv site/index.html site/mkdocs_index.html
|
|
# mv docs/* site/
|
|
|
|
- name: Configure GitHub Pages # No idea if that actually does anything...
|
|
uses: actions/configure-pages@v4
|
|
|
|
- name: Upload Pages Artifact
|
|
uses: actions/upload-pages-artifact@v2
|
|
with:
|
|
path: site/ # Important. Set to your output dir in MkDocs
|
|
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v3
|