Skip to content

Test gh-pages workflow #1

Test gh-pages workflow

Test gh-pages workflow #1

Workflow file for this run

name: Yard
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
strategy:
matrix:
ruby:
- "2.7.8"
steps:
- uses: actions/checkout@v3
# Rust is needed because I plan to setup yard-rustdoc
- name: Set up Ruby & Rust
uses: oxidize-rb/actions/setup-ruby-and-rust@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
cargo-cache: true
rubygems: "3.4.14"
- name: Build yard docs
run: YARD_OUTPUT_DIR="$RUNNER_TEMP/doc/" bundle exec yard
- name: Archive artifact
shell: sh
run: |
tar \
--dereference --hard-dereference \
--directory "$RUNNER_TEMP/doc/" \
-cvf "$RUNNER_TEMP/artifact.tar" \
.
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.name }}
path: ${{ runner.temp }}/artifact.tar
retention-days: ${{ inputs.retention-days }}
if-no-files-found: error
deploy:
needs: build
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2