add graph (#61) #171
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Github Pages | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
cache: "pip" | |
- uses: pre-commit/action@v3.0.0 | |
links: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
lfs: true | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
cache: "pip" | |
- name: Install binary deps | |
uses: daaku/gh-action-apt-install@v4 | |
with: | |
packages: graphviz gettext | |
- uses: abatilo/actions-poetry@v2 | |
- name: Install Build Deps | |
run: | | |
poetry install | |
make install-pandoc | |
- name: Check Links | |
run: make checklinks | |
html: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
lfs: true | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
cache: "pip" | |
- name: Install binary deps | |
uses: daaku/gh-action-apt-install@v4 | |
with: | |
packages: gettext | |
- uses: abatilo/actions-poetry@v2 | |
- name: Install Build Deps | |
run: | | |
poetry install | |
make install-pandoc | |
- name: Build the Blog | |
run: make html | |
- name: Check Content Size | |
run: du -h build/html | |
- name: Store Build Content | |
uses: actions/upload-artifact@v3 | |
with: | |
name: website-content | |
path: build/html | |
preview: | |
runs-on: ubuntu-latest | |
needs: [html] | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: website-content | |
- name: Deploy site preview to Netlify | |
uses: nwtgck/actions-netlify@v2.0 | |
with: | |
publish-dir: . | |
production-deploy: ${{ github.ref == 'refs/heads/main' }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
deploy-message: "Deploy from GitHub Actions" | |
enable-pull-request-comment: true | |
enable-commit-comment: false | |
overwrites-pull-request-comment: true | |
alias: deploy-preview-${{ github.event.number }} | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
timeout-minutes: 1 | |
publish: | |
runs-on: ubuntu-latest | |
needs: [html, links] | |
if: ${{ github.ref == 'refs/heads/main' }} | |
# Publish preview of the PR or the release if on master | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: website-content | |
- name: Deploy site production on Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: . | |
cname: ferres.ml |