Skip to content

Merge pull request #8 from AustralianBioCommons/kylieprac #260

Merge pull request #8 from AustralianBioCommons/kylieprac

Merge pull request #8 from AustralianBioCommons/kylieprac #260

Workflow file for this run

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
fetch_references_update_tools:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: setup python
uses: actions/setup-python@v2
with:
python-version: '3.8.16'
- name: install python packages
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: execute zotero script
run: python var/extract_zotero.py --zot-library-id 4744118
- name: execute table conversion script
run: python var/tools_table_conversion.py
- name: Commit if updated
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -A
git diff-index --quiet HEAD || git commit -m "update refs"
- name: Push if changes
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
# Use GitHub Actions' cache to cache dependencies on servers
build:
runs-on: ubuntu-latest
needs: fetch_references_update_tools
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.branch }}
- name: Setup Ruby
uses: ruby/[email protected]
with:
ruby-version: '3.1'
bundler-cache: true
cache-version: 0
- name: Setup Pages
id: pages
uses: actions/configure-pages@v2
- name: Install dependencies
run: |
bundle install
- name: Build with Jekyll
# Outputs to the './_site' directory by default
run: |
bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
env:
PAGES_REPO_NWO: ${{ github.repository }}
JEKYLL_ENV: ${{ steps.name.outputs.jekyll_env }}
JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
permissions:
contents: read
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2