feat: methods #7629
Workflow file for this run
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
name: Deploy Documentation | |
on: | |
push: | |
pull_request: | |
branches: [ master ] | |
env: | |
IMAGE_NAME: rust-llvm | |
IMAGE_VERSION: latest | |
jobs: | |
cargo-docs: | |
name: Build book | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run Documentation Build | |
run: | | |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME:$IMAGE_VERSION | |
# Change all uppercase to lowercase | |
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | |
docker pull $IMAGE_ID | |
./scripts/build.sh --container --container-name=$IMAGE_ID --doc | |
sudo chmod a+rw -R target/doc | |
sudo chmod a+rw -R book/book | |
- name: Copy documentation | |
run: | | |
cp -r book/book/ pages | |
cp -r target/doc pages/api | |
- name: Deploy to github pages | |
if: ${{ github.ref == 'refs/heads/master' }} | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./pages |