mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-05-31 15:21:00 +02:00
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 6.3.0 to 6.4.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](53b83947a5...48b55a011b)
---
updated-dependencies:
- dependency-name: actions/setup-node
dependency-version: 6.4.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
72 lines
1.9 KiB
YAML
72 lines
1.9 KiB
YAML
name: Publish website
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [lts/*]
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Build the website
|
|
run: npx gulp web
|
|
|
|
- name: Archive the website
|
|
shell: sh
|
|
run: |
|
|
chmod -c -R +rX "$INPUT_PATH" | while read line; do
|
|
echo "::warning title=Invalid file permissions automatically fixed::$line"
|
|
done
|
|
tar \
|
|
--dereference --hard-dereference \
|
|
--directory "$INPUT_PATH" \
|
|
-cvf "$RUNNER_TEMP/website.tar" \
|
|
--exclude=.git \
|
|
--exclude=.github \
|
|
.
|
|
env:
|
|
INPUT_PATH: build/gh-pages
|
|
|
|
- name: Upload the website
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: github-pages
|
|
path: ${{ runner.temp }}/website.tar
|
|
retention-days: 1
|
|
if-no-files-found: error
|
|
|
|
deploy:
|
|
name: Deploy
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
permissions:
|
|
pages: write # Required to deploy to GitHub Pages.
|
|
id-token: write # Required to verify that the deployment originates from this workflow.
|
|
|
|
steps:
|
|
- name: Deploy the website
|
|
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
|