Skip to content

Update js-yaml to v5 #1160

Update js-yaml to v5

Update js-yaml to v5 #1160

Workflow file for this run

# Inspired by: https://github.com/actions/starter-workflows/blob/1035244887e26fbbd4f1017d919fb5995cc521c4/pages/jekyll.yml
name: Build and Deploy LoopBack.io website
on:
push:
branches:
- gh-pages
workflow_dispatch: {}
permissions: {}
# Allow only one concurrent deployment, skipping runs queued between the run
# in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production
# deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
with:
disable-sudo-and-containers: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
github.com:443
index.rubygems.org:443
raw.githubusercontent.com:443
registry.npmjs.org:443
rubygems.org:443
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Use Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24.18.0
- name: Set up Ruby
uses: ruby/setup-ruby@d45b1a4e94b71acab930e56e79c6aa188764e7f9 # v1.316.0
with:
bundler-cache: true
# Used merely to expose the GitHub Pages base path for Jekyll to use.
# The website doesn't fully-support custom base paths, but this should
# ease development on forks.
- name: Setup Pages
id: pages
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
- name: Install and Build
run: |
npm ci --ignore-scripts
npm run postinstall
npm ls @loopback/docs 2>/dev/null || true
npm run build -- --baseurl "${{ steps.pages.outputs.base_path }}"
# Convenience wrapper around `actions/upload-artifact`
# Automatically uploads the './_site' directory as the `github-pages`
# artifact.
- name: Upload Artifact
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
- name: Push Changes
run: |
git add --all
if [ "$(git status -s)"! = "" ]; then
echo "Vendored assets updated. Pushing changes..."
git commit -sm 'chore: update vendored assets'
git push
else
echo "Vendored assets unchanged. Skipping push."
fi
deploy:
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
with:
egress-policy: audit
allowed-endpoints: >
api.github.com:443
github.com:443
# Convenience wrapper around `actions/download-artifact` and
# `actions/upload-pages-artifact`.
- name: Deploy to Github Pages
id: deployment
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0