Skip to content

Bump futures-core from 0.3.21 to 0.3.29 #32

Bump futures-core from 0.3.21 to 0.3.29

Bump futures-core from 0.3.21 to 0.3.29 #32

name: Build Rust docs
on:
push:
branches: [main]
pull_request:
branches: [main]
# See https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#example-using-concurrency-to-cancel-any-in-progress-job-or-run
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build_rust_docs:
runs-on: ubuntu-20.04
permissions:
contents: write
steps:
- name: Checkout branch
uses: actions/checkout@v2
- name: Checkout gh-pages
uses: actions/checkout@v2
with:
ref: gh-pages
path: out
# We need to set up git user details before we can perform git operations.
- name: Git setup
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
# Copied from https://github.com/jens-maus/RaspberryMatic/blob/ea6b8ce0dd2d53ea88b2766ba8d7f8e1d667281f/.github/workflows/ci.yml#L34-L40
- name: Free disk space
run: |
df --human-readable
sudo swapoff --all
sudo rm --force /swapfile
sudo apt clean
docker rmi $(docker image ls --all --quiet)
df --human-readable
- name: Docker pull
timeout-minutes: 10
run: |
./scripts/docker_pull
df --human-readable
# Remove all files from the "out" folder.
- name: Clear "out" folder
run: rm --recursive --force ./out/*
# Generate docs from within the Docker image.
- name: Generate docs
run: ./scripts/docker_run ./scripts/build_gh_pages ./out
# From the "out" folder, commit the results and push to the `gh-pages` branch.
# This step only applies to `push` events (not `pull_request`), and only if there are actual
# changes to commit in the "out" folder.
- name: Commit and push (post-merge only)
if: github.event_name == 'push'
run: |
cd ./out
git add .
if [[ -n "$(git status --porcelain)" ]]; then
git commit --message="Update gh-pages from ${GITHUB_SHA}"
git push
else
echo 'no changes to commit'
fi