Tests #238
Workflow file for this run
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: Deploy Documentation | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install ford | |
run: pip install ford requests==2.31 | |
- name: Install graphviz | |
run: sudo apt install graphviz | |
- name: Build documentation | |
env: | |
ADS_API_TOKEN: ${{ secrets.ADS_API_TOKEN }} | |
run: | | |
# Ford converts the markdown files to html files, we need to change | |
# the file extension before building to make links work. | |
for fn in $(ls *.md); do sed -i 's/.md)/.html)/g' $fn; done | |
# Ford will grab files from docs to build into the documentation | |
mkdir docs | |
# Ford expects a title: line on top of each file, add it before building | |
echo 'title: Readme' > docs/index.md | |
cat README.md >> docs/index.md | |
echo 'title: Installing ALPS' > docs/INSTALL.md | |
cat INSTALL.md >> docs/INSTALL.md | |
echo 'title: ALPS Tutorial' > docs/tutorial.md | |
cat tutorial.md >> docs/tutorial.md | |
echo 'title: ALPS Input' > docs/input.md | |
cat input.md >> docs/input.md | |
echo 'title: ALPS Output' > docs/output.md | |
cat output.md >> docs/output.md | |
if [ "$ADS_API_TOKEN" != "" ]; then | |
python .github/scripts/print_bib_markdown.py > docs/citingpapers.md | |
else | |
echo "⚠️ Had no API token. Skipping adding citing papers to docs" | |
fi | |
cp ALPS_logo.png docs | |
cp qrcode_alps_github.png docs | |
ford ford_project.md | |
- name: Deploy to GH pages | |
if: ${{github.event_name == 'push'}} | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: docs_out # The folder the action should deploy. |