Skip to content

chore: lock file maintenance #1187

chore: lock file maintenance

chore: lock file maintenance #1187

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@b09bb98e06d4d774595224525879c09bc6e98c40 # v2.20.1
with:
disable-sudo-and-containers: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
github.com:443
index.rubygems.org:443
nodejs.org:443
raw.githubusercontent.com:443
registry.npmjs.org:443
release-assets.githubusercontent.com:443
rubygems.org:443
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Use Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24.18.0
- name: Set up Ruby
uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.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@b09bb98e06d4d774595224525879c09bc6e98c40 # v2.20.1
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