mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-10-21 10:16:38 +00:00
Bumps the dependencies group with 1 update: [actions/deploy-pages](https://github.com/actions/deploy-pages). Updates `actions/deploy-pages` from 5.0.0 to 5.0.1 - [Release notes](https://github.com/actions/deploy-pages/releases) - [Commits](https://github.com/actions/deploy-pages/compare/cd2ce8fcbc39b97be8ca5fce6e763baed58fa128...368f82528645a54fb793d4d04e342629a3f51346) --- updated-dependencies: - dependency-name: actions/deploy-pages dependency-version: 5.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dependencies ... Signed-off-by: dependabot[bot] <support@github.com>
91 lines
3.0 KiB
Go
91 lines
3.0 KiB
Go
name: Pages
|
|
|
|
# One-time repository setup remains manual: Settings > Pages > Source -> GitHub Actions.
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
workflow_dispatch:
|
|
|
|
permissions: {}
|
|
|
|
concurrency:
|
|
group: pages
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
build:
|
|
permissions:
|
|
contents: read
|
|
pages: read
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Install locked Node dependencies
|
|
env:
|
|
PUPPETEER_SKIP_DOWNLOAD: "true"
|
|
run: npm ci
|
|
|
|
- name: Check project rules and metadata
|
|
run: |
|
|
python3 check_project_rules.py
|
|
npm test
|
|
|
|
- name: Resolve latest mdPress release
|
|
run: |
|
|
url="$(curl -fsSL --retry 3 -o /dev/null -w '%{url_effective}' https://github.com/yeasy/mdPress/releases/latest)"
|
|
version="${url##*/v}"
|
|
test -n "$version" || { echo "could not resolve latest mdPress release"; exit 1; }
|
|
echo "MDPRESS_VERSION=$version" >> "$GITHUB_ENV"
|
|
echo "resolved mdPress $version"
|
|
- name: Install mdPress (checksum-verified)
|
|
run: |
|
|
archive="$RUNNER_TEMP/mdpress_${MDPRESS_VERSION}_linux_amd64.tar.gz"
|
|
curl -fsSL --retry 3 \
|
|
"https://github.com/yeasy/mdPress/releases/download/v${MDPRESS_VERSION}/mdpress_${MDPRESS_VERSION}_linux_amd64.tar.gz" \
|
|
-o "$archive"
|
|
expected="$(curl -fsSL --retry 3 "https://github.com/yeasy/mdPress/releases/download/v${MDPRESS_VERSION}/checksums.txt" \
|
|
| awk -v f="mdpress_${MDPRESS_VERSION}_linux_amd64.tar.gz" '$2==f {print $1}')"
|
|
test -n "$expected" || { echo "no published checksum for mdpress_${MDPRESS_VERSION}_linux_amd64.tar.gz"; exit 1; }
|
|
echo "${expected} $archive" | sha256sum -c -
|
|
tar xzf "$archive" -C "$RUNNER_TEMP" mdpress
|
|
mkdir -p "$RUNNER_TEMP/bin"
|
|
install -m 0755 "$RUNNER_TEMP/mdpress" "$RUNNER_TEMP/bin/mdpress"
|
|
echo "$RUNNER_TEMP/bin" >> "$GITHUB_PATH"
|
|
|
|
- name: Build mdPress site
|
|
run: npm run build
|
|
|
|
- name: Verify site output
|
|
run: |
|
|
title=$(python3 -c 'import json; print(json.load(open("book.json", encoding="utf-8"))["title"])')
|
|
python3 tools/verify_artifacts.py --title "$title" --site _site
|
|
|
|
- name: Configure Pages
|
|
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
|
|
|
|
- name: Upload Pages artifact
|
|
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
|
|
with:
|
|
path: _site
|
|
|
|
deploy:
|
|
needs: build
|
|
permissions:
|
|
pages: write
|
|
id-token: write
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
- name: Deploy Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1
|