Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

github-actions: bump actions/checkout from 3 to 4 #176

github-actions: bump actions/checkout from 3 to 4

github-actions: bump actions/checkout from 3 to 4 #176

Workflow file for this run

name: Preview
on:
pull_request_target:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: Gemfile
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Build
run: bundle exec rake book:all
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: loongson/LoongArch-Documentation-Preview
publish_branch: gh-pages
publish_dir: ./public
destination_dir: ${{ github.event.pull_request.number }}
- name: Update status
uses: Sibz/github-status-action@v1
with:
authToken: ${{ secrets.GITHUB_TOKEN }}
context: 'LoongArch Documentation Preview / Deploy (update)'
description: 'Deployed, click "Details" to view ->'
state: 'success'
target_url: https://loongson.github.io/LoongArch-Documentation-Preview/${{ github.event.pull_request.number }}
sha: ${{ github.event.pull_request.head.sha || github.sha }}