Skip to content

[function-grep] fixed tests, fixed grammar #83

[function-grep] fixed tests, fixed grammar

[function-grep] fixed tests, fixed grammar #83

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: github pages update
# Controls when the workflow will run
on:
push:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- name: git clone
run: |
git clone https://github.com/mendelsshop/git_function_history.git
cd git_function_history
# Runs a single command using the runners shell
- name: cargo doc
run: |
cd git_function_history
cargo doc --no-deps --all-features --release --all
# Runs a set of commands using the runners shell
- name: switch to gh-pages branch and copy docs
run: |
cd git_function_history
mkdir ../gh_pages
echo "made gh_pages dir"
cp -r target/doc/* ../gh_pages/
echo "copied docs to temp dir"
git switch gh-pages
ls -la
echo "switched to gh-pages branch"
ls ../gh_pages
echo "listing gh-pages dir"
cp -rf ../gh_pages/* doc
echo "copied docs to gh-pages branch"
- name: configure git
run: |
cd git_function_history
git config user.name "github-actions"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: commit gh_pages
env:
GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }}
run: |
cd git_function_history
git add doc
echo "Updateing gh-pages"
git commit -m "Update docs"
echo "Pushing to gh-pages"
git remote set-url --push origin https://mendelsshop:[email protected]/mendelsshop/git_function_history
git branch
git push origin gh-pages