added images to dac #251
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
on: | |
push: | |
branches: | |
- main # Here source code branch is `master`, it could be other branch | |
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 "action@github.com" | |
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/github-push-action@v0.6.0 | |
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/setup-ruby@v1.127.0 | |
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 |