Skip to content

Add Debian 11 / Ubuntu 24.04 pages, fetch latest versions during inst… #836

Add Debian 11 / Ubuntu 24.04 pages, fetch latest versions during inst…

Add Debian 11 / Ubuntu 24.04 pages, fetch latest versions during inst… #836

Workflow file for this run

name: Actions
on:
push:
branches: ["*"]
pull_request:
branches: ["*"]
defaults:
run:
shell: bash
jobs:
lint:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install hatch
- name: Lint
run: |
hatch run testing:lint
- name: Mypy
run: |
hatch run testing:typing
- name: Test Python code samples
run: |
hatch run testing:test
- name: MkDocs serve warnings
run: |
hatch run testing:build
build:
runs-on: ubuntu-22.04
needs: [lint]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install hatch
- name: Build
run: |
hatch run mkdocs build
- name: Upload
run: |
export IPFS_CID=$(hatch run ./utils/publish-on-aleph.py)
echo $IPFS_CID >> $GITHUB_STEP_SUMMARY
echo "ipfs_cid=$IPFS_CID" >> $GITHUB_ENV
env:
PIPENV_IGNORE_VIRTUALENVS: 1
- name: Comment PR
if: ${{ github.event_name == 'pull_request' }}
uses: thollander/actions-comment-pull-request@v2
with:
message: |
Deployed (not pinned) on:
* https://ipfs-2.aleph.im/ipfs/${{ env.ipfs_cid }}
* https://beta.docs.aleph.im/ (may be overriden anytime by another PR)
# TODO: Move this to a decicated GitHub Action on https://github.com/aleph-im/aleph-github-actions
- name: Update Beta docs on https://beta.docs.aleph.im
if: ${{ github.event_name == 'pull_request' }}
run: |
mkdir --parents /home/runner/.aleph-im/private-keys
echo ${{ secrets.ALEPH_PRIVATE_KEY }} | xxd -r -p > /home/runner/.aleph-im/private-keys/ethereum.key
pip install 'git+https://github.com/aleph-im/aleph-client@master'
ITEM_HASH=$(aleph file pin ${{ env.ipfs_cid }} | jq -r '.item_hash')
echo 'y' | aleph domain attach beta.docs.aleph.im --item-hash $ITEM_HASH
# TODO: Move this to a decicated GitHub Action on https://github.com/aleph-im/aleph-github-actions
- name: Update the main docs on https://docs.aleph.im
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
run: |
mkdir --parents /home/runner/.aleph-im/private-keys
echo ${{ secrets.ALEPH_PRIVATE_KEY }} | xxd -r -p > /home/runner/.aleph-im/private-keys/ethereum.key
pip install 'git+https://github.com/aleph-im/aleph-client@master'
ITEM_HASH=$(aleph file pin ${{ env.ipfs_cid }} | jq -r '.item_hash')
echo 'y' | aleph domain attach docs.aleph.im --item-hash $ITEM_HASH
- uses: actions/upload-artifact@v3
with:
name: aleph-docs
path: site